Skip to content
Open
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
6 changes: 6 additions & 0 deletions crates/core/src/host/host_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,12 @@ impl HostController {

info!("replica={replica_id} database={database_identity} exiting module");
module.exit().await;
// Abort background tasks before shutting down durability.
// These tasks may call `with_auto_commit`, which calls `request_durability`.
// If the durability channel is already closed, that panics.
host.view_cleanup_task.abort();
host.disk_metrics_recorder_task.abort();
host.tx_metrics_recorder_task.abort();
let db = &module.replica_ctx().relational_db;
info!("replica={replica_id} database={database_identity} exiting database");
db.shutdown().await;
Expand Down
Loading