提交 4ef104af authored 作者: Andrei Tokar's avatar Andrei Tokar

Fixes bug in PutIfAbsentDecisionMaker

上级 eb3638d7
...@@ -168,9 +168,12 @@ abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue> { ...@@ -168,9 +168,12 @@ abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue> {
} }
logIt(existingValue); logIt(existingValue);
return setDecision(MVMap.Decision.PUT); return setDecision(MVMap.Decision.PUT);
} else if (isCommitted(blockingId) && existingValue.value == null) { } else if (isCommitted(blockingId)) {
// entry belongs to a committing transaction // entry belongs to a committing transaction
// and therefore will be committed soon // and therefore will be committed soon
if(existingValue.value != null) {
return setDecision(MVMap.Decision.ABORT);
}
logIt(null); logIt(null);
return setDecision(MVMap.Decision.PUT); return setDecision(MVMap.Decision.PUT);
} else if (getBlockingTransaction() != null) { } else if (getBlockingTransaction() != null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论