mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-15 16:32:34 +00:00
fix(client): yield Flight batches and affected rows without waiting for next message (#8918)
* fix(client): avoid Flight metrics lookahead stalls
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
* refactor(client): extract trailing Flight metrics task
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
* test(client): synchronize trailing metrics and bound cancellation
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
---------
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
(cherry picked from commit abf1396c28)
Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
@@ -1400,6 +1400,12 @@ impl BatchingTask {
|
||||
match res {
|
||||
Ok(res) => {
|
||||
let (affected_rows, _) = res.output.extract_rows_and_cost();
|
||||
if matches!(&res.output.data, common_query::OutputData::AffectedRows(_)) {
|
||||
res.metrics.wait_ready().await;
|
||||
}
|
||||
if let Some(error) = res.metrics.completion_error() {
|
||||
warn!("Flow {flow_id} completed with terminal metrics error: {error}");
|
||||
}
|
||||
debug!(
|
||||
"Flow {flow_id} executed, affected_rows: {affected_rows:?}, elapsed: {:?}, watermark: {:?}",
|
||||
elapsed,
|
||||
|
||||
Reference in New Issue
Block a user