Fix SIGSEGV in travis

Summary:
Travis build was failing a lot. For example see https://travis-ci.org/facebook/rocksdb/builds/31425845

This fixes it.

Also, please don't put any code after SignalAll :)

Test Plan: no more SIGSEGV

Reviewers: yhchiang, sdong, ljin

Reviewed By: ljin

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D21417
main
Igor Canadi 10 years ago
parent 7c88249f51
commit 5e0868147d
  1. 2
      db/db_impl.cc

@ -2022,13 +2022,13 @@ void DBImpl::BackgroundCallFlush() {
if (madeProgress || bg_schedule_needed_) { if (madeProgress || bg_schedule_needed_) {
MaybeScheduleFlushOrCompaction(); MaybeScheduleFlushOrCompaction();
} }
RecordFlushIOStats();
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.
} }
RecordFlushIOStats();
} }
void DBImpl::BackgroundCallCompaction() { void DBImpl::BackgroundCallCompaction() {

Loading…
Cancel
Save