The TOUCH command was incorrectly returning the CAS *before* the
document was updated, instead of the CAS value after the update.
Change-Id: I9f6b1dd08c67f09d3191c4d3061d63c96d894af7
Reviewed-on: http://review.couchbase.org/76961
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>
if (exptime_mutated) {
VBNotifyCtx notifyCtx = queueDirty(*v);
+ rv.getValue()->setCas(v->getCas());
// we unlock ht lock here because we want to avoid potential lock
// inversions arising from notifyNewSeqno() call
hbl.getHTLock().unlock();
touch(h, h1, "mykey", 0, (time(NULL) + 10));
checkeq(PROTOCOL_BINARY_RESPONSE_SUCCESS, last_status.load(),
"touch mykey");
+ check(last_cas != curr_cas, "touch should have returned an updated CAS");
check(get_meta(h, h1, "mykey"), "Get meta failed");
checkeq(PROTOCOL_BINARY_RESPONSE_SUCCESS, last_status.load(),