I’m developing a grails app that uses reentrant locking and database locking. I just noticed some additional files that were autogenerated. I am wondering what they are. They are called:
devDb.h2.db
devDb.lock.db
devDb.trace.db
There is also a set for test configuration:
testDb.h2.db
testDb.trace.db
I am assumming that *Db.h2.db is just my database (set to be a file rather than in memory in my DataSource.groovy). But what about the other ones?
devDb.h2.dbis the database itself. (devDb.mv.dbfor the newer version )devDb.lock.dbis a lock file. H2 allows multiple processes to share the database and this file is used to coordinate access. When the database shuts down cleanly, this file should be removed automatically.devDb.trace.dbis just a log for inspecting or debugging H2. Whether or not it’s created and how much detail gets logged can be controlled by adding aTRACE_LEVEL_FILEparameter to the JDBC URL.testDb.h2.dbandtestDb.trace.dbare the same as thedevDbcounterparts that are used in the test environment (e.g.grails test-app).