Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid flush panic when recovery encountered #15851

Merged
merged 4 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/meta/src/barrier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,12 +745,19 @@ impl GlobalBarrierManager {

send_latency_timer.observe_duration();

let node_to_collect = self
let node_to_collect = match self
.control_stream_manager
.inject_barrier(command_ctx.clone())
.inspect_err(|_| {
{
Ok(node_to_collect) => node_to_collect,
Err(err) => {
for notifier in notifiers {
notifier.notify_failed(err.clone());
}
fail_point!("inject_barrier_err_success");
})?;
return Err(err);
}
};

// Notify about the injection.
let prev_paused_reason = self.state.paused_reason();
Expand Down
4 changes: 3 additions & 1 deletion src/meta/src/barrier/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ impl BarrierScheduler {
..Default::default()
};
self.attach_notifiers(vec![notifier], checkpoint)?;
rx.await.unwrap()
rx.await
.ok()
.context("failed to wait for barrier collect")?
}

/// Run multiple commands and return when they're all completely finished. It's ensured that
Expand Down
Loading