Hi, The test interrupts the thread, which will close the database file (as always with FileChannel). Subsequent close calls will fail, this is a bug that I need to fix. However, I don't think this will corrupt the database file.
Interrupting the thread is one way to test it, killing the process is another. There are already such tests, and so far I couldn't reproduce the problem. Additional tests are with a file system implementation that simulates re-ordering writes, and power failure. Simulating power failures I have, but re-ordering writes is still missing. Then, real power failure tests are needed. This will require some work, but I think it is important. I will work on that. Regards, Thomas On Tuesday, June 2, 2015, Nicolas Fortin (OrbisGIS) <[email protected] <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > Hi, > > I try to write the unit test with thread killing. As I can't reconnect to > the DB I'm facing some problem to check if the database is corrupted. (see > attached traceback) > > https://github.com/nicolas-f/h2database/tree/thread_kill_mvstore > > As I said before, I want to reproduce a problem of corrupted db we have in > production when using this kind of "brutal" thread kill. > > regards, > > -- > > Nicolas Fortin > IRSTV FR CNRS 2488 > GIS http://orbisgis.org > Spatial DB http://h2gis.org > Noise http://noisemap.orbisgis.org > > > > Le jeudi 28 mai 2015 22:04:22 UTC+2, Thomas Mueller a écrit : >> >> Hi, >> >> That's very interesting. >> >> So far I know about a potential problem in case of power failure, and I'm >> working on fix for that. This is related to write re-ordering. Recovery is >> affected, and truncating the file needs to be delayed, but both should be >> quite simple to fix. >> >> However, the problem you describe is not related to power failure. I >> would be very interested in a test case! >> >> Regards, >> Thomas >> >> -- > 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 http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- 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 http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
