提交 d2cdd2c9 编写于 作者: A Anton Klaren 提交者: Gustav Lindroth

Remove unnecessary read during page pining

上级 a6fea549
......@@ -75,13 +75,15 @@ final class MuninnReadPageCursor extends MuninnPageCursor {
@Override
protected void pinCursorToPage(PinEvent pinEvent, long pageRef, long filePageId, PageSwapper swapper) {
init(pinEvent, pageRef);
long pagePointer = pointer;
long headVersion = getLongAt(pagePointer, littleEndian);
if (multiVersioned && shouldLoadSnapshot(headVersion)) {
if (chainFollow) {
versionStorage.loadReadSnapshot(this, versionContext, pinEvent);
if (multiVersioned) {
long pagePointer = pointer;
long headVersion = getLongAt(pagePointer, littleEndian);
if (shouldLoadSnapshot(headVersion)) {
if (chainFollow) {
versionStorage.loadReadSnapshot(this, versionContext, pinEvent);
}
versionContext.invisibleChainHead(headVersion);
}
versionContext.invisibleChainHead(headVersion);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册