提交 3bc33d61 authored 作者: Noel Grandin's avatar Noel Grandin

even in-memory MVStore, we need to mark the maps as closed

上级 d999f8d5
......@@ -18,7 +18,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.h2.compress.CompressDeflate;
import org.h2.compress.CompressLZF;
import org.h2.compress.Compressor;
......@@ -889,11 +888,8 @@ public class MVStore {
// could result in a deadlock
stopBackgroundThread();
closed = true;
if (fileStore == null) {
return;
}
synchronized (this) {
if (shrinkIfPossible) {
if (fileStore != null && shrinkIfPossible) {
shrinkFileIfPossible(0);
}
// release memory early - this is important when called
......@@ -906,6 +902,7 @@ public class MVStore {
meta = null;
chunks.clear();
maps.clear();
if (fileStore != null) {
try {
if (!fileStoreIsProvided) {
fileStore.close();
......@@ -915,6 +912,7 @@ public class MVStore {
}
}
}
}
/**
* Whether the chunk at the given position is live.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论