提交 356d8626 authored 作者: Thomas Mueller's avatar Thomas Mueller

Avoid deadlock while closing

上级 626f165d
...@@ -38,6 +38,33 @@ and there is a header after each chunk) ...@@ -38,6 +38,33 @@ and there is a header after each chunk)
header: header:
H:3,... H:3,...
Format:
Current store header:
H:3,blockSize:4096,chunk:10,creationTime:1391059293945,format:1,lastMapId:15,rootChunk:8192,version:10,fletcher:5d2a9623
used:
chunk,creationTime,format,(formatRead,)lastMapId,rootChunk,version
(blockSize not used)
fletcher
map.10 = test
name.lobData = 10
chunk: store live only if there is garbage!
Plan: (hex encoded values, H:2, rootChunk -> block, creationTime -> created, lastMapId -> map
{H:2,block:2,blockSize:1000,chunk:a,created:143e19856f9,format:1,map:b,version:a,fletcher:5d2a9623}\n
{block:2,blocks:a0,chunk:a,max:2030,pages:100,root:a020,time:103}\n
{<chunk>}\n .... {<storeHeader>}\n
map.a = test
name.lobData = a
Chunk: (id -> chunk, start -> block, length -> blocks, pageCount -> pages,
pageCountLive -> livePages, maxLength -> max, maxLengthLive -> liveMax,
metaRootPos -> root (offset))
+, if different: maxLive:1030,pagesLive:30
compression: support multiple algorithms
TODO: TODO:
Documentation Documentation
...@@ -121,6 +148,8 @@ MVStore: ...@@ -121,6 +148,8 @@ MVStore:
specially for large pages (when using the StreamStore) specially for large pages (when using the StreamStore)
- StreamStore: split blocks similar to rsync crypto, where the split is made - StreamStore: split blocks similar to rsync crypto, where the split is made
"if the sum of the past 8196 bytes divides by 4096 with zero remainder" "if the sum of the past 8196 bytes divides by 4096 with zero remainder"
- Compression: try using a bloom filter before trying to match
- DataType: change to reading and writing arrays, not individual entries
*/ */
...@@ -667,7 +696,7 @@ public class MVStore { ...@@ -667,7 +696,7 @@ public class MVStore {
try { try {
fileStore.writeFully(pos, buffer); fileStore.writeFully(pos, buffer);
} catch (IllegalStateException e) { } catch (IllegalStateException e) {
close(); closeImmediately();
throw e; throw e;
} }
} }
...@@ -1959,6 +1988,10 @@ public class MVStore { ...@@ -1959,6 +1988,10 @@ public class MVStore {
return; return;
} }
backgroundWriterThread = null; backgroundWriterThread = null;
if (Thread.currentThread() == t) {
// within the thread itself - can not join
return;
}
synchronized (t.sync) { synchronized (t.sync) {
t.sync.notifyAll(); t.sync.notifyAll();
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论