Closed andrewbaxter439 closed 9 months ago
Update from experimentation:
DatabaseUtils.databaseInputUrl
static (removing line above) to direct subsequent runs to use the initial copied database, the run fails as it seems the database remains locked to further queries
conn = DriverManager.getConnection()
in SimPathsModel.class line 2256 does manage to connectjakarta.Persistence.createEntityManagerFactory()
in JAS-mine-core::DatabaseUtils.class line 252 does not connectinput.mv.db
database, but do not lock it in the same way that run n=1 has locked the output/yyyymmdd/input/input.mv.db
database copyI would presume that the key to making this work (runs n+1 onwards reading the copied input.mv.db
) would be to find all instances of creating a connection with this database and ensuring that they're all closed or run as server mode?
Resolved in #41
The following lines seem to:
input.mv.db
- to a unique folderoutput/yyyymmdd/input
DatabaseUtils.databaseInputUrl
to be the rootinput.mv.db
output/yyyymmdd/input/input.mv.db
untouched for the rest of the run?https://github.com/jasmineRepo/JAS-mine-core/blob/6350178f69953577c97a10f451a7661e802efda1/microsim-core/src/main/java/microsim/data/ExperimentManager.java#L159-L160
https://github.com/jasmineRepo/JAS-mine-core/blob/6350178f69953577c97a10f451a7661e802efda1/microsim-core/src/main/java/microsim/data/ExperimentManager.java#L177-L180
The odd thing is, commenting out this line and running again produces, only in the second run of the multirun, the following error:
I would expect the copied input database to be the stable, correct database for all subsequent runs?