Open DillonJ opened 1 year ago
This is probably more related to spinedb_api. Since recently spinedb_api keeps a cache of the DB in the memory and maybe we are failing to invalidate it.
Edit: actually I don't think this is the cause here. SpineInterface reads the full database from 'disk' so it can't be a cache invalidation issue.
I wonder if https://github.com/spine-tools/Spine-Toolbox/issues/2154 has improved the situation?
I think this is a Julia specific thing and something to be aware of generally with Julia. What has helped is the toolbox option to automatically kill consoles. Maybe just something that needs to be mentioned in the documentation somewhere?
I feel that reuse of Julia consoles is somewhat problematic.
I have had it cause issues that were difficult to diagnose and unexpected.
A problem is that it is on the one hand, useful that a Julia tool runs more quickly the second time, but on the other hand, it can result in old data being used.
I have also seen issues here where restarting the Julia console is the solution to the problem but this isn't at all obvious to a new user.
Perhaps it is particularly an issue with Spine Interface. I have rerun tools with updated data but it looks like some old version of a DB is stored in memory and is trumping the new version.
Perhaps we need to at least alert users to this in some way - perhaps Spine Interface should issue a warning to users when existing in-memory data is somehow trumping the sqlite file which may have been updated.
Sorry I can't be more specific but I thought it would be good to at least raise this here.