Skip to content

Commit 3ab607e

Browse files
cursoragentLUAgam
authored andcommitted
Gate delay rebase on init timestamp
Co-authored-by: 859235917 <859235917@qq.com>
1 parent bb41323 commit 3ab607e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/actiontech/dble/backend/heartbeat/MySQLDelayDetector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private void delayCal(long delay, long delayThreshold) {
5656
heartbeat.setSlaveBehindMaster((int) delayVal);
5757
heartbeat.setDbSynStatus(MySQLHeartbeat.DB_SYN_NORMAL);
5858
} else {
59-
if (heartbeat.getStatus() != MySQLHeartbeat.OK_STATUS) {
59+
if (logic == 0) {
6060
long updatedLogic = dbGroup.getLogicTimestamp().updateAndGet(current -> Math.max(current, delay));
6161
LOGGER.warn("delay detection rebased logic_timestamp to {} for dbGroup {}", updatedLogic, dbGroup.getGroupName());
6262
heartbeat.setSlaveBehindMaster(0);

0 commit comments

Comments
 (0)