Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BugFix] When the status of HeartBeat is not ok, it also need to be s…
…ynced to follower (#8265) When master the received heartbeat status is not ok, the heartbeat info also need to be synced to follower. Otherwise, the failed heartbeat information will not be synchronized to the follower. Since the failed heartbeat info also modifies fe's memory, this.heartbeatRetryTimes++; if it is not synchronized to the follower, this will cause the master and follower's metadata to be inconsistent.
- Loading branch information
1 parent
34c31bc
commit 81c05bb
Showing
5 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
fe/fe-core/src/test/java/com/starrocks/system/ComputeNodeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// This file is licensed under the Elastic License 2.0. Copyright 2021-present, StarRocks Limited. | ||
package com.starrocks.system; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import com.starrocks.system.HeartbeatResponse.HbStatus; | ||
|
||
public class ComputeNodeTest { | ||
|
||
@Test | ||
public void testHbStatusBadNeedSync() { | ||
|
||
BackendHbResponse hbResponse = new BackendHbResponse(); | ||
hbResponse.status = HbStatus.BAD; | ||
|
||
ComputeNode node = new ComputeNode(); | ||
boolean needSync = node.handleHbResponse(hbResponse); | ||
Assert.assertTrue(needSync); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters