Skip to content

Commit

Permalink
[fix][dingo-executor] fix issue pessimistic txn hanging when updating…
Browse files Browse the repository at this point in the history
… table.
  • Loading branch information
nokiaMS authored and githubgxll committed Sep 26, 2024
1 parent 2767ee6 commit 185b6b1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ public boolean onePcStage() {
//get primary key.
cacheToObject = primaryLockTo();
primaryKey = cacheToObject.getMutation().getKey();
mutations.add(cacheToObject.getMutation());
partIdSet.add(cacheToObject.getPartId());

while (transform.hasNext()) {
Expand All @@ -403,7 +404,9 @@ public boolean onePcStage() {
break;
} else {
//build Mutaions.
mutations.add(TransactionCacheToMutation.localDatatoMutation(txnLocalData, TransactionType.PESSIMISTIC));
if(!Arrays.equals(txnLocalData.getKey(), primaryKey)) {
mutations.add(TransactionCacheToMutation.localDatatoMutation(txnLocalData, TransactionType.PESSIMISTIC));
}
}
}

Expand Down

0 comments on commit 185b6b1

Please sign in to comment.