From 2b39ca76e0bbc64c12321d4ec627212fd9e06e06 Mon Sep 17 00:00:00 2001 From: Brett Lawson Date: Fri, 20 Jan 2017 12:13:12 -0800 Subject: [PATCH] Fix bug in SetRemove causing wrong cas to be returned. Change-Id: I4ed1acba87313b3539e2b8518c915e9578f36ee8 Reviewed-on: http://review.couchbase.org/74944 Reviewed-by: Mark Nunberg Tested-by: Brett Lawson --- bucket_ds.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucket_ds.go b/bucket_ds.go index a4399f03..7c17ce63 100644 --- a/bucket_ds.go +++ b/bucket_ds.go @@ -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!