-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
Hyperdex (http://hyperdex.com/) needs a feature we don't currently support: iterating through the log. We would export LSNs as a string through this interface:
// Return an opaque timestamp that identifies the current point in time of the // database. This timestamp may be subsequently presented to the // NewReplayIterator method to create a ReplayIterator. virtual void GetReplayTimestamp(std::string* timestamp) = 0;
Then this interface gets a simplified log cursor:
// Release a previously allocated replay iterator. virtual void ReleaseReplayIterator(ReplayIterator* iter) = 0;
ReplayIterators just return each key/value pair in the log after the starting LSN, with a way to distinguish puts from removes.
@sueloverso, can you please take a look at the best way to implement this down in the log layer?
I think the implementation of ReplayIterator can keep an LSN that increases as each log record is returned, and it can crack open the log record to return the key/value pairs.
Thanks!