[RCBC-59] Bucket#cas doesn't set original flags Created: 18/Jul/12  Updated: 13/Nov/12  Resolved: 18/Jul/12

Status: Closed
Project: Couchbase Ruby client library
Component/s: None
Affects Version/s: 1.1.2, 1.2.0.dp5
Fix Version/s: 1.1.3, 1.2.0.dp6
Security Level: Public

Type: Bug Priority: Critical
Reporter: Sergey Avseyev Assignee: Sergey Avseyev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

The Bucket#cas operation resets flags

  > Couchbase.bucket.set("foo", "bar", :flags => 0x100)
  > Couchbase.bucket.cas("foo") { "baz" }
  > Couchbase.bucket.get("foo", :extended => true)
  ["baz", 0, 1712422461213442048]

So it could be dangerous if someone using custom flags or non-default value encoding (not :document)

Comment by Sergey Avseyev [ 18/Jul/12 ]
Generated at Fri Oct 24 19:01:48 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.