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
This commit is contained in:
Yueh-Hsuan Chiang 2014-10-03 00:25:27 -07:00
parent 0e516a75da
commit 56dfd363fd
1 changed files with 1 additions and 1 deletions

View File

@ -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");
}