MB-20105: Ensure purge_seq is not reset when no items are purged in a compaction 26/65626/5 v3.1.6
authorManu Dhundi <manu@couchbase.com>
Mon, 11 Jul 2016 21:38:15 +0000 (14:38 -0700)
committerManu Dhundi <manu@couchbase.com>
Mon, 11 Jul 2016 21:56:11 +0000 (21:56 +0000)
commit6e10f8a2c0c45f256a81a658f05c212591706f38
treeff3f0fa5cd53502598d942444a4c67d87b6ce6ca
parent1fe3aac8ed713a3b6b2d22f198c062baa5e7a92e
MB-20105: Ensure purge_seq is not reset when no items are purged in a compaction

When a compaction request is made, we initially set the purge_seqno in the req
to 0, hoping to update it when we purge items. However, if there are no purged
items in a compaction call, then we end up reseting the purge_seqno
(correct one) set by the previous compaction call.

This commit addresses the problem by setting the purge seqno in the request
to current purge seqno in the ep-engine.

Change-Id: I9581abe7a4cb9d7cd84c1bf5563b98c91dc67525
Reviewed-on: http://review.couchbase.org/65626
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
src/ep.cc
tests/ep_testsuite.cc