Fix bad merge of D16791 and D16767

Summary: A bad Auto-Merge caused log buffer is flushed twice. Remove the unintended one.

Test Plan: Should already be tested (the code looks the same as when I ran unit tests).

Reviewers: haobo, igor

Reviewed By: haobo

CC: ljin, yhchiang, leveldb

Differential Revision: https://reviews.facebook.net/D16821
This commit is contained in:
sdong
2014-03-11 18:00:46 -07:00
parent 86ba3e24e3
commit 839c8ecfcd
5 changed files with 107 additions and 32 deletions

View File

@@ -73,6 +73,12 @@ class TransactionLogIterator {
// Can read data from a valid iterator.
virtual bool Valid() = 0;
// IsObsolete() returns true if new log files were created. This usually
// means that the user needs to close the current iterator and create a new
// one to get the newest updates. It should happen only when mem tables are
// flushed.
virtual bool IsObsolete() = 0;
// Moves the iterator to the next WriteBatch.
// REQUIRES: Valid() to be true.
virtual void Next() = 0;