Skip to content

Commit

Permalink
Fix bug in SetRemove causing wrong cas to be returned.
Browse files Browse the repository at this point in the history
Change-Id: I4ed1acba87313b3539e2b8518c915e9578f36ee8
Reviewed-on: http://review.couchbase.org/74944
Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com>
Tested-by: Brett Lawson <brett19@gmail.com>
  • Loading branch information
brett19 committed Mar 28, 2017
1 parent f2ef6cc commit 2b39ca7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bucket_ds.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (b *Bucket) SetRemove(key string, value interface{}) (Cas, error) {
return 0, ErrRangeError
}

b.Replace(key, newSetContents, cas, 0)
cas, err = b.Replace(key, newSetContents, cas, 0)
if err != nil {
if err == ErrKeyExists {
// If this is just a CAS error, try again!
Expand Down

0 comments on commit 2b39ca7

Please sign in to comment.