Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangheihei committed Nov 24, 2024
1 parent 4f8a334 commit 47f1d8e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public void applyVisibleLog(TransactionState txnState, TableCommitInfo commitInf
for (Tablet tablet : index.getTablets()) {
boolean hasFailedVersion = false;
List<Replica> replicas = ((LocalTablet) tablet).getImmutableReplicas();
boolean isDependencyReplicasNotCommited = txnState.
checkTransactionDependencyReplicasNotCommited((LocalTablet) tablet, quorumReplicaNum);
for (Replica replica : replicas) {
if (txnState.isNewFinish()) {
updateReplicaVersion(version, replica, txnState.getFinishState());
Expand All @@ -130,9 +132,7 @@ public void applyVisibleLog(TransactionState txnState, TableCommitInfo commitInf
if (!txnState.tabletCommitInfosContainsReplica(tablet.getId(), replica.getBackendId(),
replica.getState())
|| errorReplicaIds.contains(replica.getId())) {
if (txnState.
checkTransactionDependencyReplicasNotCommited((LocalTablet) tablet, quorumReplicaNum)
&& replica.getVersion() >= version
if (isDependencyReplicasNotCommited && replica.getVersion() >= version
&& replica.getState() == Replica.ReplicaState.DECOMMISSION) {
// this means the replica is a normal replica
// success version always move forward
Expand Down

0 comments on commit 47f1d8e

Please sign in to comment.