feat: Region writer wait flush done

This commit is contained in:
evenyag
2023-03-14 14:09:22 +08:00
parent f556052951
commit 83aeadc506

View File

@@ -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