An public api to fetch the latest transaction id.

Summary:
Implement a interface to retrieve the most current transaction
id from the database.

Test Plan: Added unit test.

Reviewers: sheki

Reviewed By: sheki

CC: leveldb

Differential Revision: https://reviews.facebook.net/D7269
This commit is contained in:
Dhruba Borthakur
2012-12-10 15:37:00 -08:00
parent dcd919a0a4
commit 24fc379273
4 changed files with 12 additions and 0 deletions

View File

@@ -182,6 +182,9 @@ class DB {
virtual Status GetLiveFiles(std::vector<std::string>&,
uint64_t* manifest_file_size) = 0;
// The sequence number of the most recent transaction.
virtual SequenceNumber GetLatestSequenceNumber() = 0;
// Return's an iterator for all writes since the sequence number
// Status::ok if iterator is valid.
// The iterator internally holds references to the available log files.