diff --git a/src/storage/src/region/writer.rs b/src/storage/src/region/writer.rs index a8a1e0094f..8f9e529490 100644 --- a/src/storage/src/region/writer.rs +++ b/src/storage/src/region/writer.rs @@ -266,7 +266,14 @@ impl RegionWriter { ensure!(!inner.is_closed(), error::ClosedRegionSnafu); - inner.manual_flush(writer_ctx).await + inner.manual_flush(writer_ctx).await?; + + // Wait flush. + if let Some(handle) = inner.flush_handle.take() { + handle.join().await?; + } + + Ok(()) } /// Cancel flush task if any