提交 885b6917 authored 作者: Thomas Mueller's avatar Thomas Mueller

MVStore bugfix

上级 7a73e121
......@@ -887,6 +887,12 @@ public class MVStore {
}
buff.limit(length);
// free up the space of unused chunks now
for (Chunk x : removedChunks) {
int len = MathUtils.roundUpInt(x.length, BLOCK_SIZE) + BLOCK_SIZE;
fileStore.free(x.start, len);
}
long end = getEndPosition();
long filePos;
if (reuseSpace) {
......@@ -897,12 +903,6 @@ public class MVStore {
}
boolean storeAtEndOfFile = filePos + length >= end;
// free up the space of unused chunks now
for (Chunk x : removedChunks) {
int len = MathUtils.roundUpInt(x.length, BLOCK_SIZE) + BLOCK_SIZE;
fileStore.free(x.start, len);
}
c.start = filePos;
c.length = chunkLength;
c.metaRootPos = meta.getRoot().getPos();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论