Hi, I've been seeing corruption in MVStore after calling compactMoveChunks()
2018-06-29 12:49:14,451 INFO [ISAAC-IO-work-thread 127] (MVDataStoreProvider.java:278) - Running MVStore compact ... 2018-06-29 12:49:14,517 WARN [JavaFX Application Thread] (TimedTask.java:156) - Timed task failed! java.lang.IllegalStateException: Reading from nio:/mnt/STORAGE/Work/mv-store/mv-store.mv failed; file length 4231352320 read length 2048 at 4232136998 [1.4.197/1] at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:870) ~[h2-1.4.197.jar:1.4.197] at org.h2.mvstore.DataUtils.readFully(DataUtils.java:417) ~[h2-1.4.197.jar:1.4.197] at org.h2.mvstore.FileStore.readFully(FileStore.java:98) ~[h2-1.4.197.jar:1.4.197] at org.h2.mvstore.Page.read(Page.java:181) ~[h2-1.4.197.jar:1.4.197] at org.h2.mvstore.MVStore.readPage(MVStore.java:1936) ~[h2-1.4.197.jar:1.4.197] at org.h2.mvstore.MVMap.readPage(MVMap.java:698) ~[h2-1.4.197.jar:1.4.197] at org.h2.mvstore.Page.getChildPage(Page.java:208) ~[h2-1.4.197.jar:1.4.197] at org.h2.mvstore.MVMap.binarySearch(MVMap.java:454) ~[h2-1.4.197.jar:1.4.197] at org.h2.mvstore.MVMap.binarySearch(MVMap.java:455) ~[h2-1.4.197.jar:1.4.197] at org.h2.mvstore.MVMap.get(MVMap.java:436) ~[h2-1.4.197.jar:1.4.197] .... Caused by: java.io.EOFException at org.h2.mvstore.DataUtils.readFully(DataUtils.java:405) ~[h2-1.4.197.jar:1.4.197] ... 20 more This happens when compactMoveChunks is run on a thread that is part of one thread pool, while many other operations are trying to interact with the DB on other threads. As expected, those threads get blocked, during the compaction. The error happens, occasionally, when they are unblocked and allowed to run again. Not sure if it is related, but I also have a bug that was calling compactMoveChunks() several times in a row, prior to the error happening. I'm opening my store with the most basic options: new MVStore.Builder().fileName(new File(mvFolder, MV_STORE + ".mv").getAbsolutePath()).open(); Any suggestions for avoiding this, other than not calling compactMoveChunks() ? Perhaps, I should block my own threads prior to calling it, so I know that no operations are hitting it? I can provide instructions / code (its opensource) to reproduce this, but its not a simple test case, if you want to try to get to the bottom of it. 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.
