mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-16 12:40:36 +00:00
don't unwrap() the activate() result in spawn_load / spawn_attach
This commit is contained in:
@@ -614,10 +614,13 @@ impl Tenant {
|
||||
"attach tenant",
|
||||
false,
|
||||
async move {
|
||||
match tenant_clone.attach(&ctx).await {
|
||||
Ok(_) => {
|
||||
tenant_clone.activate(&ctx).unwrap(); // WIP
|
||||
}
|
||||
let doit = async {
|
||||
tenant_clone.attach(&ctx).await?;
|
||||
tenant_clone.activate(&ctx)?;
|
||||
anyhow::Ok(())
|
||||
};
|
||||
match doit.await {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
tenant_clone.set_broken(e.to_string());
|
||||
error!("error attaching tenant: {:?}", e);
|
||||
@@ -881,10 +884,13 @@ impl Tenant {
|
||||
"initial tenant load",
|
||||
false,
|
||||
async move {
|
||||
match tenant_clone.load(&ctx).await {
|
||||
Ok(()) => {
|
||||
tenant_clone.activate(&ctx).unwrap(); // WIP
|
||||
}
|
||||
let doit = async {
|
||||
tenant_clone.load(&ctx).await?;
|
||||
tenant_clone.activate(&ctx)?;
|
||||
anyhow::Ok(())
|
||||
};
|
||||
match doit.await {
|
||||
Ok(()) => {}
|
||||
Err(err) => {
|
||||
tenant_clone.set_broken(err.to_string());
|
||||
error!("could not load tenant {tenant_id}: {err:?}");
|
||||
|
||||
Reference in New Issue
Block a user