MB-23590: Update del_with_meta to accept a value (xattrs) 56/76256/5
authorJim Walker <jim@couchbase.com>
Tue, 4 Apr 2017 09:37:40 +0000 (10:37 +0100)
committerDave Rigby <daver@couchbase.com>
Thu, 6 Apr 2017 15:03:13 +0000 (15:03 +0000)
commit6fd7dd0920daf7c46e1f18d905d31f0e36a977cf
tree6b03798c35bf7b95f46cfa00519750dd27447f55
parent8560a6eab37972a29a6dbbc2db9057a366aacb5a
MB-23590: Update del_with_meta to accept a value (xattrs)

Clients need to be able to perform del_with_meta with an xattr value
i.e. delete the document, but leave the xattrs.

This commit adds the simple functionality of setting a value but does
not add more extensive functionality where we need to consider pruning
user xattrs from the deleted document.

This commit is also flawed in that a subsequent set with cas following
the delete may succeed when it should not as the del_with_meta(xattr)
leaves the StoredValue in the HT marked as isDeleted where a
del_with_meta would remove it from the HT, giving a different result
to the subsequent set.

Change-Id: I3f6d50ab96d60724a24d33abe405f2f4df069480
Reviewed-on: http://review.couchbase.org/76256
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
src/ep_engine.cc
src/stored-value.h
src/vbucket.cc
tests/ep_test_apis.cc
tests/ep_test_apis.h
tests/ep_testsuite_xdcr.cc