Gate delay rebase on init timestamp

Co-authored-by: 859235917 <859235917@qq.com>
This commit is contained in:
Cursor Agent
2026-01-19 06:28:27 +00:00
committed by Rico
parent bb41323c98
commit 3ab607ee91
@@ -56,7 +56,7 @@ public class MySQLDelayDetector extends MySQLDetector {
heartbeat.setSlaveBehindMaster((int) delayVal);
heartbeat.setDbSynStatus(MySQLHeartbeat.DB_SYN_NORMAL);
} else {
if (heartbeat.getStatus() != MySQLHeartbeat.OK_STATUS) {
if (logic == 0) {
long updatedLogic = dbGroup.getLogicTimestamp().updateAndGet(current -> Math.max(current, delay));
LOGGER.warn("delay detection rebased logic_timestamp to {} for dbGroup {}", updatedLogic, dbGroup.getGroupName());
heartbeat.setSlaveBehindMaster(0);