bbeaudreault commented on code in PR #5228:
URL: https://github.com/apache/hbase/pull/5228#discussion_r1323080007
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java:
##########
@@ -196,13 +196,17 @@ static boolean isEmptyStopRow(byte[] row) {
return Bytes.equals(row, EMPTY_END_ROW);
}
- static void resetController(HBaseRpcController controller, long timeoutNs,
int priority) {
+ static void resetController(HBaseRpcController controller, long timeoutNs,
int priority,
+ TableName tableName) {
controller.reset();
if (timeoutNs >= 0) {
controller.setCallTimeout(
(int) Math.min(Integer.MAX_VALUE,
TimeUnit.NANOSECONDS.toMillis(timeoutNs)));
}
controller.setPriority(priority);
+ if (tableName != null) {
+ controller.setTableName(tableName);
Review Comment:
@zhuyaogai I think you are right that its unlikely for the table name to
change for the same RpcRetryingCaller. I'm just trying to ensure that we code
defensively here, since who knows how the code will change in the future.
That said, the contract seems to be that we always should reset the
controller before using it. So I think you're good to just reset the table name
there, and leave this code here as-is.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]