Skip to content
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

Add Backend method like TimeSeries.unlock() #234

Closed
OFR-IIASA opened this issue Dec 11, 2019 · 2 comments
Closed

Add Backend method like TimeSeries.unlock() #234

OFR-IIASA opened this issue Dec 11, 2019 · 2 comments

Comments

@OFR-IIASA
Copy link

When a script fails and a scenario is checked out, then there is no possibility to unlock the scenario. Previously, there used to be a possibility to do this using the command mp.._jobj.unlockRunid(). This is of course not ideal as it was more of a backdoor solution, but this feature would be nice for expert users, which is no longer available since switching to the new backend.

@OFR-IIASA OFR-IIASA added the enh New features & functionality label Dec 11, 2019
@khaeru khaeru changed the title No possibility to unlock scenarios Add Backend method like TimeSeries.unlock() Dec 11, 2019
@khaeru
Copy link
Member

khaeru commented Dec 11, 2019

Backend API docs, for reference.

Some thoughts:

  • The .check_out()/.commit() methods are in TimeSeries, rather than Scenario.
  • I've always felt these were a weird hybrid of SQL and git semantics.
    • In SQL, there is nothing like CHECK_OUT, only COMMIT, ROLLBACK, and some others.
      • ixmp lacks anything like ROLLBACK.
    • git checkout modifies or reverts the working tree.
      • In most workflows, it is not needed to call it before modifying files.
      • Often, when used, its meaning is actually closer to SQL ROLLBACK: git checkout -- file.txt rolls back file.txt to its content as of the last commit.
    • Neither includes a notion of locking.
  • .check_out() and .commit() actually do THREE things:
  • The 'locked' status of a TimeSeries seems to mean 'locked for other users'.
    • ixmp.Platform and base.Backend don't explicitly discuss the (possibly) multi-user nature of Backends.
    • In SQL, if a transaction fails or is rolled back, it is simply not committed, and nothing prevents another set of modifications from starting immediately.

@khaeru
Copy link
Member

khaeru commented Feb 11, 2020

Duplicate of #30, which is about 1.5 years older.

@khaeru khaeru closed this as completed Feb 11, 2020
@khaeru khaeru added duplicate and removed enh New features & functionality labels Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants