提交 0b760740 authored 作者: andrei's avatar andrei

Stronger coherence check

上级 b940440b
...@@ -110,7 +110,8 @@ public class TransactionMap<K, V> { ...@@ -110,7 +110,8 @@ public class TransactionMap<K, V> {
committingTransactions = store.committingTransactions.get(); committingTransactions = store.committingTransactions.get();
mapRootReference = map.getRoot(); mapRootReference = map.getRoot();
undoLogRootReference = store.undoLog.getRoot(); undoLogRootReference = store.undoLog.getRoot();
} while(committingTransactions != store.committingTransactions.get()); } while(committingTransactions != store.committingTransactions.get() ||
mapRootReference != map.getRoot());
Page undoRootPage = undoLogRootReference.root; Page undoRootPage = undoLogRootReference.root;
long undoLogSize = undoRootPage.getTotalCount(); long undoLogSize = undoRootPage.getTotalCount();
...@@ -332,7 +333,8 @@ public class TransactionMap<K, V> { ...@@ -332,7 +333,8 @@ public class TransactionMap<K, V> {
committingTransactions = store.committingTransactions.get(); committingTransactions = store.committingTransactions.get();
mapRootReference = map.getRoot(); mapRootReference = map.getRoot();
undoLogRootReference = store.undoLog.getRoot(); undoLogRootReference = store.undoLog.getRoot();
} while(committingTransactions != store.committingTransactions.get()); } while(committingTransactions != store.committingTransactions.get() ||
mapRootReference != map.getRoot());
Page mapRootPage = mapRootReference.root; Page mapRootPage = mapRootReference.root;
current = map.get(mapRootPage, key); current = map.get(mapRootPage, key);
...@@ -427,7 +429,8 @@ public class TransactionMap<K, V> { ...@@ -427,7 +429,8 @@ public class TransactionMap<K, V> {
committingTransactions = store.committingTransactions.get(); committingTransactions = store.committingTransactions.get();
mapRootReference = map.getRoot(); mapRootReference = map.getRoot();
undoLogRootReference = store.undoLog.getRoot(); undoLogRootReference = store.undoLog.getRoot();
} while(committingTransactions != store.committingTransactions.get()); } while(committingTransactions != store.committingTransactions.get() ||
mapRootReference != map.getRoot());
Page undoRootPage = undoLogRootReference.root; Page undoRootPage = undoLogRootReference.root;
Page mapRootPage = mapRootReference.root; Page mapRootPage = mapRootReference.root;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论