MB-23999: Perform CAS check only if item being stored is alive 17/77217/6
authorSriram Ganesan <sriram@couchbase.com>
Fri, 21 Apr 2017 23:15:15 +0000 (16:15 -0700)
committerSriram Ganesan <sriram@couchbase.com>
Tue, 25 Apr 2017 14:14:02 +0000 (14:14 +0000)
commitff778e1439a112e872c4255ccfb2ffb99b560392
treeaa26d2c9492d429ce244febcda4a4ba9a7fc44bf
parentc58d9f4fc1595856bda897f845707e7646980f26
MB-23999: Perform CAS check only if item being stored is alive

If the existing document is expired, then storing another
deleted document with a CAS results in a ENOENT instead of
returning EEXISTS. The CAS check on an expired document is only
applicable if the incoming document is not in Deleted state

Change-Id: Ib6b78dd50236770a6be27a5fe341e321ef4eaec2
Reviewed-on: http://review.couchbase.org/77217
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
src/vbucket.cc
tests/module_tests/vbucket_test.cc