MB-24151: Implement memory managed backfills using Range Iterators
This commit implements memory management in the backfills of
Ephemeral buckets. It borrows the idea from disk backfills where
the backfill is suspended upon high memory usage, that is items
are not put onto the readyQ of the stream.
At the core is a Backfill state machine which is driven by
the BackfillManagerTask. It keeps track of any suspended backill
and also resumes from the suspended point. It also creates a range
iterators on the in-memory sequence list and using this iterator
it reads (backfills) items one by one.
This commit also adds certain features to the sequence list iterators
to get snapshot numbers, estimate num items in backfill etc.
Change-Id: Id92b0693763e550f842fb7fb5911cfefd8935e79
Reviewed-on: http://review.couchbase.org/78055
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
16 files changed: