MB-20852 [15/N]: Accurately track meta items within checkpoints 20/69020/8
authorDave Rigby <daver@couchbase.com>
Tue, 11 Oct 2016 16:14:03 +0000 (17:14 +0100)
committerDave Rigby <daver@couchbase.com>
Tue, 1 Nov 2016 07:56:58 +0000 (07:56 +0000)
commitba75d06f48f29e85c9eda66434ce70aa36b81471
tree1d3ed6fc2ab0f8d6eb97553d3be31dde5c9697ee
parentbed33dbde2a2acc56ebadac39b61c53c1ddbdcb2
MB-20852 [15/N]: Accurately track meta items within checkpoints

Instead of assuming that a Checkpoint only contains 1 (Open) or 2
(Closed) meta-items, maintain a count of items within each Checkpoint,
and track how many meta-items a CheckpointCursor has read.

This allows us to support an arbitrary number of meta-items within a
Checkpoint, and in any sequence. This feature will be used to add
support for set_vbstate meta-items in a subsquent patches.

Change-Id: I8fb3040cbe64e316aae1f693afee65001b2b4b17
Reviewed-on: http://review.couchbase.org/69020
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: buildbot <build@couchbase.com>
src/checkpoint.cc
src/checkpoint.h
src/item.h