syncbase: Implement log start marker and hook for GC.
Watchable store now keeps track of the log start via a persistent
marker. The watch log is now contiguous starting from the marker,
while entries before the marker may be sparse and partially garbage
collected. Clients attempting to start watching from a resume marker
earlier than the log start are rejected.
Added UpdateLogStart() method to the watchable store. It is intended
to be called by GC, passing in the sync resume marker. It persists and
returns the newly computed log start. The log start is computed as the
earliest resume marker out of all active watch clients - ephemeral
clients as well as the persistent sync watcher. This prevents garbage
collection from interrupting an active watch as well as ensuring that
the sync watcher sees all data.
Added test for UpdateLogStart(), also covering NextBatchFromLog()
iteration from previous CL.
10 files changed