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

Implement Irmin.compare_and_set #288

Closed
samoht opened this issue Sep 2, 2015 · 1 comment
Closed

Implement Irmin.compare_and_set #288

samoht opened this issue Sep 2, 2015 · 1 comment
Labels
type/bug Related to a bug
Milestone

Comments

@samoht
Copy link
Member

samoht commented Sep 2, 2015

This is actually currently only implemented for the RW backend as it is the basis to ensure that Irmin.update is consistent. Could be useful to implement it in the high-level API though (instead of throwing a "TODO") though.

@samoht
Copy link
Member Author

samoht commented Feb 15, 2017

S.with_tree, S.set, S.set_treeandS.removenow have an optional argument?strategy` which can either be:

  • Set: "last writer wins" which was the only option in pre-1.0.
  • Test_and_set: atomic update of the subtree, checking if the previous subtree has changed and retrying the transaction if that's the case.

@samoht samoht closed this as completed Feb 15, 2017
@samoht samoht modified the milestone: 1.0.0 Feb 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Related to a bug
Projects
None yet
Development

No branches or pull requests

1 participant