You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "clebertsuconic (via GitHub)" <gi...@apache.org> on 2025/11/11 02:24:54 UTC
Re: [PR] ARTEMIS-5753 Fixing Races between Page Oscilation and Replication [activemq-artemis]
clebertsuconic commented on code in PR #6037:
URL: https://github.com/apache/activemq-artemis/pull/6037#discussion_r2512600947
##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/SimpleManagement.java:
##########
@@ -101,8 +101,15 @@ public long getCurrentTimeMillis() throws Exception {
return simpleManagementLong("broker", "getCurrentTimeMillis");
}
- public boolean isReplicaSync() throws Exception {
- return simpleManagementBoolean("broker", "isReplicaSync");
+ public boolean isReplicaSync() {
+ try {
+ return simpleManagementBoolean("broker", "isReplicaSync");
+ } catch (Throwable e) {
+ // in case of a failure we return false..
+ // so the caller may keep retrying until it's true
+ logger.warn(e.getMessage(), e);
+ return false;
Review Comment:
I would prefer that because the SimpleManagement is like meant for an utility class. I initially did it for the testsuite, and then used it on the CLI.
I don't think we should really use a logger on this 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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact