You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Pengzna (via GitHub)" <gi...@apache.org> on 2024/02/23 09:34:06 UTC
[PR] Do not wait to retry when configLeader exists [iotdb]
Pengzna opened a new pull request, #12075:
URL: https://github.com/apache/iotdb/pull/12075
After introducing https://github.com/apache/iotdb/pull/11941, when the configNode client is newly created and looking for a leader, it is expected to not wait if there is a leader.
TODOļ¼docs
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Do not wait to retry when configLeader exists [iotdb]
Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #12075:
URL: https://github.com/apache/iotdb/pull/12075#discussion_r1502000396
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java:
##########
@@ -243,6 +226,15 @@ private void tryToConnect() throws TException {
logger.warn("The current node may have been down {},try next node", configLeader);
configLeader = null;
}
+ } else {
+ try {
+ // Wait to start the next try
+ Thread.sleep(RETRY_INTERVAL_MS);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new TException(
Review Comment:
fixed
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Do not wait to retry when configLeader exists [iotdb]
Posted by "liyuheng55555 (via GitHub)" <gi...@apache.org>.
liyuheng55555 commented on code in PR #12075:
URL: https://github.com/apache/iotdb/pull/12075#discussion_r1501996759
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java:
##########
@@ -243,6 +226,15 @@ private void tryToConnect() throws TException {
logger.warn("The current node may have been down {},try next node", configLeader);
configLeader = null;
}
+ } else {
+ try {
+ // Wait to start the next try
+ Thread.sleep(RETRY_INTERVAL_MS);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new TException(
Review Comment:
Seems not necessary to throw an exception here ?
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Do not wait to retry when configLeader exists [iotdb]
Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum merged PR #12075:
URL: https://github.com/apache/iotdb/pull/12075
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org