MB-23711: [Ephemeral] Allow pageOut of Deleted-with-value document 28/76128/14
authorDave Rigby <daver@couchbase.com>
Fri, 31 Mar 2017 13:58:38 +0000 (14:58 +0100)
committerDave Rigby <daver@couchbase.com>
Mon, 24 Apr 2017 18:20:17 +0000 (18:20 +0000)
commitcc26527b8cace0f9bf415799d546068114102b42
treeda2e88add28f535717f2bd8f80e9783b929f77c3
parent26d87382c1e703a9479ed08d5a001bee5e86cfb8
MB-23711: [Ephemeral] Allow pageOut of Deleted-with-value document

A Deleted-with-value should be able to be paged out under Ephemeral
buckets (if we're low on space we should be able to remove the deleted
body), however this currently fails as it is not permitted to delete
an item which is already marked as deleted.

Given the semantics of Deleted documents are slightly different now we
have Deleted Bodies, we /should/ be able to delete something which has
a deleted value.

Update StoredValue and HashTable to correctly set the deleted flag in
this case, and correct the count of items in the HashTable.

Change-Id: I9bba6fb5779b82b16fa0a6b3bac7ccf468c4c47f
Reviewed-on: http://review.couchbase.org/76128
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
src/hash_table.cc
src/stored-value.cc
src/stored-value.h
src/vbucket.h
tests/module_tests/ephemeral_vb_test.cc