diff --git a/db/db_impl/db_impl_write.cc b/db/db_impl/db_impl_write.cc index 0fc6f47e77d..9cea7cc2b84 100644 --- a/db/db_impl/db_impl_write.cc +++ b/db/db_impl/db_impl_write.cc @@ -1529,7 +1529,9 @@ IOStatus DBImpl::WriteToWAL(const WriteThread::WriteGroup& write_group, } for (auto& log : logs_) { + log.PrepareForSync(); io_s = log.writer->file()->Sync(immutable_db_options_.use_fsync); + log.FinishSync(); if (!io_s.ok()) { break; }