mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-27 02:44:18 +00:00
Temp Fix of LogBuffer flushing
Summary: To temp fix the log buffer flushing. Flush the buffer inside the lock. Clean the trunk before we find an eventual fix. Test Plan: make all check Reviewers: haobo, igor Reviewed By: igor CC: ljin, leveldb, yhchiang Differential Revision: https://reviews.facebook.net/D16791
This commit is contained in:
parent
cb9802168f
commit
6c66bc08d9
|
@ -1923,13 +1923,13 @@ void DBImpl::BackgroundCallFlush() {
|
||||||
if (madeProgress) {
|
if (madeProgress) {
|
||||||
MaybeScheduleFlushOrCompaction();
|
MaybeScheduleFlushOrCompaction();
|
||||||
}
|
}
|
||||||
|
log_buffer.FlushBufferToLog();
|
||||||
bg_cv_.SignalAll();
|
bg_cv_.SignalAll();
|
||||||
// IMPORTANT: there should be no code after calling SignalAll. This call may
|
// IMPORTANT: there should be no code after calling SignalAll. This call may
|
||||||
// signal the DB destructor that it's OK to proceed with destruction. In
|
// signal the DB destructor that it's OK to proceed with destruction. In
|
||||||
// that case, all DB variables will be dealloacated and referencing them
|
// that case, all DB variables will be dealloacated and referencing them
|
||||||
// will cause trouble.
|
// will cause trouble.
|
||||||
}
|
}
|
||||||
log_buffer.FlushBufferToLog();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1996,13 +1996,13 @@ void DBImpl::BackgroundCallCompaction() {
|
||||||
if (madeProgress) {
|
if (madeProgress) {
|
||||||
MaybeScheduleFlushOrCompaction();
|
MaybeScheduleFlushOrCompaction();
|
||||||
}
|
}
|
||||||
|
log_buffer.FlushBufferToLog();
|
||||||
bg_cv_.SignalAll();
|
bg_cv_.SignalAll();
|
||||||
// IMPORTANT: there should be no code after calling SignalAll. This call may
|
// IMPORTANT: there should be no code after calling SignalAll. This call may
|
||||||
// signal the DB destructor that it's OK to proceed with destruction. In
|
// signal the DB destructor that it's OK to proceed with destruction. In
|
||||||
// that case, all DB variables will be dealloacated and referencing them
|
// that case, all DB variables will be dealloacated and referencing them
|
||||||
// will cause trouble.
|
// will cause trouble.
|
||||||
}
|
}
|
||||||
log_buffer.FlushBufferToLog();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Status DBImpl::BackgroundCompaction(bool* madeProgress,
|
Status DBImpl::BackgroundCompaction(bool* madeProgress,
|
||||||
|
|
Loading…
Reference in a new issue