Hi, 

I've managed to deadlock the MVStore:

"MVStore background writer 
nio:/mnt/COMPUTE/scratch/b/db-builder/target/large-demo-1.1.data/mv-store/mv-store.mv":
        at org.h2.mvstore.MVStore.commitAndSave(MVStore.java:983)
        - waiting to lock <0x00000003d5f4f7b8> (a org.h2.mvstore.MVStore)
        at org.h2.mvstore.MVStore.beforeWrite(MVStore.java:2205)
        at org.h2.mvstore.MVMap.beforeWrite(MVMap.java:1008)
        at org.h2.mvstore.MVMap.put(MVMap.java:120)
        - locked <0x00000003d9f5fde8> (a org.h2.mvstore.MVMap)
        at org.h2.mvstore.MVMap.replace(MVMap.java:578)
        - locked <0x00000003d9f5fde8> (a org.h2.mvstore.MVMap)
        at org.h2.mvstore.MVMap.rewrite(MVMap.java:768)
        at org.h2.mvstore.MVMap.rewrite(MVMap.java:785)
        at org.h2.mvstore.MVMap.rewrite(MVMap.java:785)
        at org.h2.mvstore.MVMap.rewrite(MVMap.java:744)
        at org.h2.mvstore.MVStore.compactRewrite(MVStore.java:1902)
        at org.h2.mvstore.MVStore.compact(MVStore.java:1784)
        - locked <0x00000003d6539b10> (a java.lang.Object)
        at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2495)
        at 
org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:2713)
"ISAAC-Q-work-thread 33":
        at org.h2.mvstore.MVMap.put(MVMap.java:119)
        - waiting to lock <0x00000003d9f5fde8> (a org.h2.mvstore.MVMap)
        at org.h2.mvstore.MVStore.compactRewriteFully(MVStore.java:1584)
        - locked <0x00000003d5f4f7b8> (a org.h2.mvstore.MVStore)
        at 
sh.isaac.provider.mvStore.MVDataStoreProvider.compact(MVDataStoreProvider.java:762)
        at 
sh.isaac.provider.datastore.DatastoreLocator.compact(DatastoreLocator.java:399)


>From my logging and the code traces, I believe these are the only calls 
involved:

store.commit();
try
{
store.getFileStore().getFile().force(true);  //make sure everything is 
synced to disk, before we start our compact sequence
}
catch (IOException e)
{
LOG.error("Unexpected:", e);
}
store.compactRewriteFully();

What can I do to prevent this from happening?  Do you want me to file a bug 
report?  I would have thought that committing and flushing would have also 
flushed the background writer... but apparently not... is there some way to 
sync and flush the background writer?

Thanks, 

Dan

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to