couchbaselabs / couchbaselabs/cbgt
couchbase Cfg on CAS of 0 should do Add not Set
Open
- Dominant language
- Go
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Another concurrency issue, found by Nimish! @nimishzynga
If two concurrent cbgt's are initially racing to read an empty Cfg, then they'll both get a not-found response and also CAS of 0.
Then later, when they each try to do a Cfg.Set(), the couchbase Cfg implementation currently (incorrectly) does a bucket.Set() when the CAS is 0. Instead, the implementation should do a bucket.Add() when the CAS is 0 in order to have a clean concurrency race winner.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.