Skip to content

Commit b695598

Browse files
committed
Add comments
Signed-off-by: hhwyt <[email protected]>
1 parent 82ad5dc commit b695598

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

db/db_impl/db_impl.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5853,7 +5853,12 @@ Status DBImpl::IngestExternalFiles(
58535853
InstrumentedMutexLock l(&mutex_);
58545854
TEST_SYNC_POINT("DBImpl::AddFile:MutexLock");
58555855

5856-
// Stop writes to the DB by entering both write threads
5856+
// Stop writes to the DB by entering both write threads.
5857+
// Even with allow_write = true, writes to the DB must be temporarily
5858+
// stopped to wait for pending writes. This is because allow_write = true
5859+
// only requires users to ensure no concurrent writes overlap with the
5860+
// ingestion data and does not require ensuring no overlapping
5861+
// unordered_write before ingestion.
58575862
WriteThread::Writer w;
58585863
write_thread_.EnterUnbatched(&w, &mutex_);
58595864
WriteThread::Writer nonmem_w;

0 commit comments

Comments
 (0)