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

Enable Compare and Set (CAS) for Sets #15

Closed
somethingnew2-0 opened this issue Dec 9, 2014 · 3 comments
Closed

Enable Compare and Set (CAS) for Sets #15

somethingnew2-0 opened this issue Dec 9, 2014 · 3 comments
Labels

Comments

@somethingnew2-0
Copy link

In the documentation for the methods it states Set a value in the Consul Key/Value store, using the CAS mechanism to ensure that the set is atomic. However it appears that only ?index= is used for a blocking call to the consul server. This doesn't prevent concurrent writes I believe as another consul server could update the value before the original call is set. I could be mistaken, however, as since it using a blocking query the call to consul should return until the raft quorum has accepted the value.

What I would suggest though is that consul does include a cas method with ?cas=<index> instead of just ?index=<index> as specified in the consul http api doc. I could be wrong though.

@gmr
Copy link
Owner

gmr commented Dec 19, 2014

Good find, I think this is something that changed from when I originally wrote the code (Consul 0.2 iirc). Anyway, I'll address this in 0.3.0 which should drop soon.

@gmr gmr added the bug label Dec 19, 2014
@gmr
Copy link
Owner

gmr commented Mar 13, 2015

This is dropping today in 0.4.0

@gmr gmr closed this as completed Mar 13, 2015
@somethingnew2-0
Copy link
Author

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants