From 56dfd363fd51aa10c7f1d9d965c8bbbefffa6c30 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Fri, 3 Oct 2014 00:25:27 -0700 Subject: [PATCH] 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 --- db/db_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 5d6eaf197..7463f749b 100644 --- a/db/db_impl.cc +++ b/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"); }