commit | 6a3ad5d484b61f7e848a2f92af9414ddd52a7613 | [log] [tgz] |
---|---|---|
author | Ivan Pilat <ivanpi@google.com> | Tue Jul 12 12:19:15 2016 -0700 |
committer | Ivan Pilat <ivanpi@google.com> | Tue Jul 12 12:19:15 2016 -0700 |
tree | 55f5f55204ae002b5eb33a3051669534298caac5 | |
parent | 15fb261e1fb9766f778863779d140a29f8f5f0a4 [diff] |
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
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.