Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -928,16 +928,29 @@ public void finishTransaction(long transactionId, Set<Long> errorReplicaIds) thr
for (Tablet tablet : index.getTablets()) {
int healthReplicaNum = 0;
for (Replica replica : tablet.getReplicas()) {
if (!errorReplicaIds.contains(replica.getId()) && replica.getLastFailedVersion() < 0) {
if (replica.getLastFailedVersion() >= 0) {
LOG.info("publish version failed for transaction {} on tablet {},"
+ " on replica {} due to lastFailedVersion >= 0",
transactionState, tablet, replica);
continue;
}
if (!errorReplicaIds.contains(replica.getId())) {
if (replica.checkVersionCatchUp(partition.getVisibleVersion(), true)) {
++healthReplicaNum;
} else {
LOG.info("publish version failed for transaction {} on tablet {},"
+ " on replica {} due to not catchup",
transactionState, tablet, replica);
}
} else if (replica.getVersion() >= partitionCommitInfo.getVersion()) {
// the replica's version is larger than or equal to current transaction
// partition's version the replica is normal, then remove it from error replica ids
// TODO(cmy): actually I have no idea why we need this check
errorReplicaIds.remove(replica.getId());
++healthReplicaNum;
} else {
LOG.info("publish version failed for transaction {} on tablet {},"
+ " on replica {} due to version hole", transactionState, tablet, replica);
}
}

Expand Down