Fix a check in database shutdown or Column family drop during flush.

Summary:
Fix a check in database shutdown or Column family drop during flush.

Special thanks to Maurice Barnum who spots the problem :)

Test Plan: db_test

Reviewers: ljin, igor, sdong

Reviewed By: sdong

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D24273
main
Yueh-Hsuan Chiang 10 years ago
parent 0e516a75da
commit 56dfd363fd
  1. 2
      db/db_impl.cc

@ -1614,7 +1614,7 @@ Status DBImpl::FlushMemTableToOutputFile(
Status s = WriteLevel0Table(cfd, mutable_cf_options, mems, edit,
&file_number, log_buffer);
if (s.ok() && shutting_down_.Acquire_Load() && cfd->IsDropped()) {
if (s.ok() && (shutting_down_.Acquire_Load() || cfd->IsDropped())) {
s = Status::ShutdownInProgress(
"Database shutdown or Column family drop during flush");
}

Loading…
Cancel
Save