virajjasani commented on code in PR #2286:
URL: https://github.com/apache/phoenix/pull/2286#discussion_r2345632141
##########
phoenix-core-client/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:
##########
@@ -1730,16 +1730,16 @@ private void checkAndRetry(RetriableOperation op)
throws InterruptedException, T
ConnectionQueryServicesImpl.this.props.getLong(QueryServices.DELAY_FOR_SCHEMA_UPDATE_CHECK,
QueryServicesOptions.DEFAULT_DELAY_FOR_SCHEMA_UPDATE_CHECK);
boolean success = false;
- int numTries = 1;
+ int numTries = 0;
PhoenixStopWatch watch = new PhoenixStopWatch();
watch.start();
do {
try {
success = op.checkForCompletion();
} catch (Exception ex) {
- // If we encounter any exception on the first or last try, propagate
the exception and fail.
+ // If we encounter any exception on the first try, propagate the
exception and fail.
// Else, we swallow the exception and retry till we reach maxRetries.
- if (numTries == 1 || numTries == maxRetries) {
Review Comment:
This logic was also not right, `numTries == maxRetries` is never going to be
the case
--
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]