Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hhwyt committed Jan 8, 2025
1 parent 82ad5dc commit 6a859b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion db/db_impl/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5853,7 +5853,12 @@ Status DBImpl::IngestExternalFiles(
InstrumentedMutexLock l(&mutex_);
TEST_SYNC_POINT("DBImpl::AddFile:MutexLock");

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

0 comments on commit 6a859b7

Please sign in to comment.