Skip to content

Commit 40e0131

Browse files
committed
Fix error
Signed-off-by: hhwyt <[email protected]>
1 parent ff3e293 commit 40e0131

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

db/db_impl/db_impl.cc

+2-4
Original file line numberDiff line numberDiff line change
@@ -5853,11 +5853,11 @@ Status DBImpl::IngestExternalFiles(
58535853
InstrumentedMutexLock l(&mutex_);
58545854
TEST_SYNC_POINT("DBImpl::AddFile:MutexLock");
58555855

5856+
WriteThread::Writer w;
5857+
WriteThread::Writer nonmem_w;
58565858
if (!allow_write) {
58575859
// Stop writes to the DB by entering both write threads.
5858-
WriteThread::Writer w;
58595860
write_thread_.EnterUnbatched(&w, &mutex_);
5860-
WriteThread::Writer nonmem_w;
58615861
if (two_write_queues_) {
58625862
nonmem_write_thread_.EnterUnbatched(&nonmem_w, &mutex_);
58635863
}
@@ -6025,11 +6025,9 @@ Status DBImpl::IngestExternalFiles(
60256025
}
60266026

60276027
if (!allow_write) {
6028-
WriteThread::Writer nonmem_w;
60296028
if (two_write_queues_) {
60306029
nonmem_write_thread_.ExitUnbatched(&nonmem_w);
60316030
}
6032-
WriteThread::Writer w;
60336031
write_thread_.ExitUnbatched(&w);
60346032
}
60356033

0 commit comments

Comments
 (0)