提交 d3c3192f authored 作者: Noel Grandin's avatar Noel Grandin

fix "fix concurrenccy in freedPageSpace"

I was using the putIfAbsent API wrong
上级 a8fd0915
......@@ -2008,12 +2008,16 @@ public final class MVStore {
}
// synchronize, because pages could be freed concurrently
synchronized (freed) {
Chunk f = freed.get(chunkId);
if (f == null) {
f = freed.putIfAbsent(chunkId, new Chunk(chunkId));
Chunk chunk = freed.get(chunkId);
if (chunk == null) {
chunk = new Chunk(chunkId);
Chunk chunk2 = freed.putIfAbsent(chunkId, chunk);
if (chunk2 != null) {
chunk = chunk2;
}
}
f.maxLenLive -= maxLengthLive;
f.pageCountLive -= pageCount;
chunk.maxLenLive -= maxLengthLive;
chunk.pageCountLive -= pageCount;
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论