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.

Change-Id: I5e38aef4414fce1495c8da80e907de13fce9ae14
10 files changed
tree: 55f5f55204ae002b5eb33a3051669534298caac5
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTING.md
  11. CONTRIBUTORS
  12. envvar.go
  13. envvar_test.go
  14. LICENSE
  15. PATENTS
  16. README.md
  17. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.