The Couchbase::Bucket class hasn't
implemented the #dup method. So it caused
SEGFAULT. The patch is implementing correct function, which copy
the internals and initializes new connection.
Issues: RCBC-64
make object_space gc protector per-bucket object
previous version provided not completely thread-safe bucket instance, because it was sharing global hash for protecting objects, created in extension, from garbage collecting.
Issues: RCBC-60
The flags might be reset if caller will use
Couchbase::Bucket#cas operation. Here is IRB
session demostrating the issue:
irb> Couchbase.bucket.set("foo", "bar", :flags => 0x100) 17982951084586893312 irb> Couchbase.bucket.cas("foo") { "baz" } 1712422461213442048 irb> Couchbase.bucket.get("foo", :extended => true) ["baz", 0, 1712422461213442048]
Issues: RCBC-59