-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read-only scenario opening #437
Comments
I would suggest this is a strict duplicate of #30, as any fix there will also allow this. |
I would argue
is different than
but am happy for the issue to be closed as you see fit @khaeru ! |
To summarize the PRs linked from #30 (comment)
So we could as suggested store a new, ¹ See also “Versioning and locking” in the (old) ECE GitHub wiki (this page was not migrated when the ECE MediaWiki was set up). Different notions of state (locked, unlocked; checked out, checked out for "timeseries only" editing; now read_only) are already quite jumbled, and adding new ones worsens the problem. |
This is now migrated, please see here :) |
It seems to me that the underlying problem here is that scenarios are erroneously locked. Using a context manager for locking scenarios would probably mitigate most of these wrong locks, what do you think? Edit: Nevermind, I just tested context manager behaviour and it seems not even SIGTERM results in the context manager exiting correctly, my bad. |
If the context manager is part of the process on a local machine that looses connection to the database, it cannot change the "lock state" or initiate a roll-back for a run in the database. Alternatives:
|
That's true, I guess we would like to know what the most common problem here is...
If we were to settle on a database system that problem could probably be solved without building custom client/server infrastructure by using temporary tables for example, ensuring atomic operations (on top of atomic transactions in the database itself). |
Thanks! In the old/GitHub wiki, I replaced the migrated content with a link to the new location, so there is no confusion.
Agreed, this is what was described on the linked page (final line). |
I regularly run into issues around scenarios being locked when they are purely used for data reading. This can be true any time a scenario is needed for cloning, for example. In my use cases, this locking is never related to actual read safety, but rather because some process that had read it failed for some reason (ran out of memory, was killed externally, etc.). These occurrences happen daily on HPG901 in my experience.
It sounds like other users are also running into this issue regularly, so would suggest making this a high priority.
The simplest way around this is to place a read-only status on scenario instances. These would not lock the scenario, but also would not allow changes. They would therefore be robust against unexpected system exits.
cc @adrivinca @khaeru @LauWien @meksor @danielhuppmann
The text was updated successfully, but these errors were encountered: