mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 16:30:56 +00:00
Adding Flush to AutoRollLogger
Summary: During running AutoRollLoggerTest on FreeBSD we have found out that AutoRollLogger is not flushing correctly (test fails on FreeBSD) This diff add Flush to AutoRollLogger to fix this problem Test Plan: [My machine] make all check ( all tests pass) [FreeBSD VM] running AutoRollLoggerTest ( all tests pass ) Reviewers: sdong, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D33633
This commit is contained in:
parent
92416fa7f2
commit
06a766de56
|
@ -56,6 +56,12 @@ class AutoRollLogger : public Logger {
|
|||
return logger_->GetLogFileSize();
|
||||
}
|
||||
|
||||
void Flush() {
|
||||
if (logger_) {
|
||||
logger_->Flush();
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~AutoRollLogger() {
|
||||
}
|
||||
|
||||
|
|
|
@ -308,6 +308,7 @@ TEST(AutoRollLoggerTest, LogHeaderTest) {
|
|||
Info(&logger, (kSampleMessage + ":LogHeaderTest line %d").c_str(), i);
|
||||
++i;
|
||||
}
|
||||
LogFlush(&logger);
|
||||
|
||||
// verify that the new log contains all the header logs
|
||||
std::stringstream ssbuf;
|
||||
|
|
Loading…
Reference in a new issue