Andor Molnar created HBASE-29877:
------------------------------------
Summary: Load Test Tool doesn't read with TIMELINE consistency,
because it sets replica id explicitly
Key: HBASE-29877
URL: https://issues.apache.org/jira/browse/HBASE-29877
Project: HBase
Issue Type: Bug
Components: test, util
Affects Versions: 2.6.4, 3.0.0-beta-1, 2.4.18
Reporter: Andor Molnar
Assignee: Andor Molnar
HBase LTT tries to set *TIMELINE* consistency in *MultiThreadedReader* when a
replica id other than primary is set in the command line.
However when _replicaId_ is set explicitly in the request,
*ConnectionUtil.timelineConsistentRead()* will skip sending the request to
multiple replicas, it actually will do a *STRONG* read on the specified replica.
In MultiThreadedReader this looks like:
{code:java}
if (regionReplicaId > 0) {
get.setReplicaId(regionReplicaId);
get.setConsistency(Consistency.TIMELINE);
} {code}
Implemented in HBASE-11572
While in ConnectionUtil.timelineConsistentRead() I see skipping the logic:
{code:java}
static <T> CompletableFuture<T> timelineConsistentRead(AsyncRegionLocator
locator,
TableName tableName, Query query, byte[] row, RegionLocateType locateType,
Function<Integer, CompletableFuture<T>> requestReplica, long rpcTimeoutNs,
long primaryCallTimeoutNs, Timer retryTimer, Optional<MetricsConnection>
metrics) {
if (query.getConsistency() != Consistency.TIMELINE) {
return requestReplica.apply(RegionReplicaUtil.DEFAULT_REPLICA_ID);
}
// user specifies a replica id explicitly, just send request to the specific
replica
if (query.getReplicaId() >= 0) {
return requestReplica.apply(query.getReplicaId());
}
// Timeline consistent read, where we may send requests to other region
replicas
... {code}
This part comes from HBASE-21663
In order to do a full TIMELINE consistent request we need to make sure that
replicaId is not set (-1) in the request and consistency is set to TIMELINE.
I suggest adding a new parameter to LTT called *--timeline* to cover all
possible scenarios.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)