Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow changing multiple key values atomically #886
We would like to use
At this time Consul doesn't support atomically writing more than one key. You could acquire separate locks on a few different keys and only release once all were acquired/written, but this is by no means atomic, and watches would not be coalesced. It's an interesting idea though, so I'll mark this as thinking for now.
@ryanuber Thanks, this feature will be much appreciated.
For anyone's interested: atomicity can also be achieved in the watcher handler level with an implementation close to the following:
Consider that there are N keys we would like to update atomically, at once:
The watcher handler keeps a map of uuids to a list of KVs.
This was referenced
May 3, 2015
referenced this issue
May 15, 2015
We would love to see this implemented. I don't think it would necessarily need to be atomic. The basic idea is that it would be nice to have a way to update multiple key's that would affect the same file - in one go - and have the file be updated by consul only once.