Merge pull request #5 from GreptimeTeam/feat/wait-flush-done

feat: Region writer wait flush done
This commit is contained in:
Lei, HUANG
2023-03-14 14:28:39 +08:00
committed by GitHub

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