You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.The text was updated successfully, but these errors were encountered: