提交 9069ba5c authored 作者: Noel Grandin's avatar Noel Grandin

flatten methods

上级 5a2ea19a
......@@ -1413,7 +1413,9 @@ public class MVStore {
registerChunk(DataUtils.getPageChunkId(pos));
}
int count = page.map.getChildPageCount(page);
if (count > 0) {
if (count == 0) {
return;
}
ChunkIdsCollector childCollector = getChild();
for (int i = 0; i < count; i++) {
Page childPage = page.getChildPageIfLoaded(i);
......@@ -1429,14 +1431,15 @@ public class MVStore {
cacheChunkRef.put(pos, chunkIds, Constants.MEMORY_ARRAY + 4 * chunkIds.length);
}
}
}
public void visit(long pos) {
if (!DataUtils.isPageSaved(pos)) {
return;
}
registerChunk(DataUtils.getPageChunkId(pos));
if (DataUtils.getPageType(pos) != DataUtils.PAGE_TYPE_LEAF) {
if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
return;
}
int chunkIds[];
if (cacheChunkRef != null && (chunkIds = cacheChunkRef.get(pos)) != null) {
// there is a cached set of chunk ids for this position
......@@ -1469,7 +1472,6 @@ public class MVStore {
}
}
}
}
private ChunkIdsCollector getChild() {
if (child == null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论