RongtongJin commented on code in PR #4733:
URL: https://github.com/apache/rocketmq/pull/4733#discussion_r933915650
##########
broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:
##########
@@ -625,12 +626,17 @@ public void run() {
@Override
public void run() {
try {
- BrokerController.this.slaveSynchronize.syncAll();
+ if (System.currentTimeMillis() - lastSyncTimeMs >
60 * 1000) {
+
BrokerController.this.getSlaveSynchronize().syncAll();
+ lastSyncTimeMs = System.currentTimeMillis();
+ }
+ //timer checkpoint, latency-sensitive, so sync it
more frequently
+
BrokerController.this.getSlaveSynchronize().syncTimerCheckPoint();
} catch (Throwable e) {
LOG.error("Failed to sync all config for slave.",
e);
}
}
- }, 1000 * 10, 1000 * 60, TimeUnit.MILLISECONDS);
+ }, 1000 * 10, 3 * 1000, TimeUnit.MILLISECONDS);
Review Comment:
Syncall is originally 60s, since timer checkpoint is latency-sensitive, sync
it more frequently
--
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]