couchbaselabs / couchbaselabs/cbgt

couchbase Cfg on CAS of 0 should do Add not Set

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.