Skip to content

Commit

Permalink
[BugFix] Fix the bug in the FE clone scheduling that causes an infini…
Browse files Browse the repository at this point in the history
…te loop (backport #50561) (#50787)

Signed-off-by: sevev <[email protected]>
Co-authored-by: zhangqiang <[email protected]>
  • Loading branch information
mergify[bot] and sevev authored Sep 9, 2024
1 parent 7209a49 commit 7207d3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,11 @@ public boolean chooseDestReplicaForVersionIncomplete(Map<Long, PathSlot> backend
} else if (replica.getLastSuccessVersion() > replica.getLastFailedVersion()) {
chosenReplica = replica;
break;
} else if (replica.getLastFailedVersion() < chosenReplica.getLastFailedVersion()) {
} else if (replica.getVersion() < chosenReplica.getVersion()) {
// we should first repair the lower version replica
chosenReplica = replica;
} else if (replica.getVersion() == chosenReplica.getVersion() &&
replica.getLastFailedVersion() < chosenReplica.getLastFailedVersion()) {
// it's better to select a low last failed version replica
chosenReplica = replica;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public class TabletSchedCtxTest {
.createType(PrimitiveType.TINYINT), true, null, "", "key1"));

private static int TABLET_ID_1 = 50000;
private static int TABLET_ID_2 = 51000;

private Backend be1;
private Backend be2;
Expand Down

0 comments on commit 7207d3a

Please sign in to comment.