MB-23994: Update deletedTime when deleted SV is re-deleted 88/76488/11
authorDave Rigby <daver@couchbase.com>
Fri, 7 Apr 2017 14:11:39 +0000 (15:11 +0100)
committerManu Dhundi <manu@couchbase.com>
Tue, 25 Apr 2017 15:57:28 +0000 (15:57 +0000)
commit61e49f8442e80320ef78e95e64def5408f01c2bb
tree8f6cabc96c7592077d3ab9f3df13a36a1c44db11
parent76ec957e180b758ce1e836ed2858ef371b0f037f
MB-23994: Update deletedTime when deleted SV is re-deleted

When re-deleting an already deleted item (for example when the deleted
item has a body and that body is changed), the DeletedTime was not
updated.  As such, it may be purged too early - the purge age should
be based on the last modification of the item.

Fix by ensuring the deletedTime is updated whenever the item is
(re)deleted, not just the first time.

Change-Id: I8d901cd82720597235f1400dcb2c88643ff7ed10
Reviewed-on: http://review.couchbase.org/76488
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Manu Dhundi <manu@couchbase.com>
src/stored-value.cc
src/stored-value.h
tests/module_tests/ephemeral_vb_test.cc