mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-01 04:20:39 +00:00
safekeeper: fix panic in debug_dump. (#9097)
Panic was triggered only when dump selected no timelines. sentry report: https://neondatabase.sentry.io/issues/5832368589/
This commit is contained in:
@@ -253,6 +253,13 @@ pub async fn build(args: Args) -> Result<Response> {
|
||||
});
|
||||
}
|
||||
|
||||
// Tokio forbids to drop runtime in async context, so this is a stupid way
|
||||
// to drop it in non async context.
|
||||
tokio::task::spawn_blocking(move || {
|
||||
let _r = runtime;
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(Response {
|
||||
start_time,
|
||||
finish_time: Utc::now(),
|
||||
|
||||
Reference in New Issue
Block a user