提交 72b5d5cc authored 作者: Andrei Tokar's avatar Andrei Tokar

replace faulty assertion

上级 44047777
...@@ -30,7 +30,9 @@ final class RollbackDecisionMaker extends MVMap.DecisionMaker<Object[]> { ...@@ -30,7 +30,9 @@ final class RollbackDecisionMaker extends MVMap.DecisionMaker<Object[]> {
@Override @Override
public MVMap.Decision decide(Object[] existingValue, Object[] providedValue) { public MVMap.Decision decide(Object[] existingValue, Object[] providedValue) {
assert decision == null; assert decision == null;
assert existingValue != null; // normaly existingValue will always be there except of db initialization
// where some undo log enty was captured on disk but actual map entry was not
if (existingValue != null ) {
VersionedValue valueToRestore = (VersionedValue) existingValue[2]; VersionedValue valueToRestore = (VersionedValue) existingValue[2];
long operationId; long operationId;
if (valueToRestore == null || if (valueToRestore == null ||
...@@ -45,6 +47,7 @@ final class RollbackDecisionMaker extends MVMap.DecisionMaker<Object[]> { ...@@ -45,6 +47,7 @@ final class RollbackDecisionMaker extends MVMap.DecisionMaker<Object[]> {
listener.onRollback(map, key, previousValue, valueToRestore); listener.onRollback(map, key, previousValue, valueToRestore);
} }
} }
}
decision = MVMap.Decision.REMOVE; decision = MVMap.Decision.REMOVE;
return decision; return decision;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论