Skip to content

Commit

Permalink
[fix](load data) decommission replica don't load data when it misses …
Browse files Browse the repository at this point in the history
…versions (#38198)

BUG: when a decommission replica misses versions (last failed version >
0), it will cause a bug:
1. It cann't do compaction due to it has miss versions;
2. It cann't  cloning the missing rowsets because it's decommissioned.

So if it continue to load data, its rowset will increase util it cause
error -235(TOO MANY VERSION).

Fix:  don't write data to the decommission replica if it miss rowsets.
  • Loading branch information
yujun777 authored Jul 23, 2024
1 parent af94b06 commit 1d315b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ private Multimap<Long, Long> getNormalReplicaBackendPathMapImpl(String beEndpoin

ReplicaState state = replica.getState();
if (state.canLoad()
|| (state == ReplicaState.DECOMMISSION && replica.getPostWatermarkTxnId() < 0)) {
|| (state == ReplicaState.DECOMMISSION
&& replica.getPostWatermarkTxnId() < 0
&& replica.getLastFailedVersion() < 0)) {
map.put(backendId, replica.getPathHash());
}
}
Expand Down

0 comments on commit 1d315b2

Please sign in to comment.