From c98e2f69992c436baa6f002267e96bb308456cf7 Mon Sep 17 00:00:00 2001 From: Qi Xu Date: Thu, 21 Mar 2024 21:32:28 -0700 Subject: [PATCH] fix manifest incorrect WAL size Signed-off-by: Qi Xu --- db/db_impl/db_impl_write.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/db_impl/db_impl_write.cc b/db/db_impl/db_impl_write.cc index 86a2f71d27a..dc3eb8ded3e 100644 --- a/db/db_impl/db_impl_write.cc +++ b/db/db_impl/db_impl_write.cc @@ -1509,7 +1509,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; }