Merge pull request 'db-snapshot: Add error handling to metadata snapshot creation' (#930) from handle_snapshot_errors into main
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
Reviewed-on: #930 Reviewed-by: Armael <armael@noreply.localhost>
This commit is contained in:
commit
63f20bdeab
1 changed files with 6 additions and 2 deletions
|
@ -484,7 +484,7 @@ impl AdminRpcHandler {
|
|||
AdminRpc::MetaOperation(MetaOperation::Snapshot { all: false }),
|
||||
PRIO_NORMAL,
|
||||
)
|
||||
.await
|
||||
.await?
|
||||
}))
|
||||
.await;
|
||||
|
||||
|
@ -497,7 +497,11 @@ impl AdminRpcHandler {
|
|||
ret.push(format!("{:?}\t{}", to, res_str));
|
||||
}
|
||||
|
||||
Ok(AdminRpc::Ok(format_table_to_string(ret)))
|
||||
if resps.iter().any(Result::is_err) {
|
||||
Err(GarageError::Message(format_table_to_string(ret)).into())
|
||||
} else {
|
||||
Ok(AdminRpc::Ok(format_table_to_string(ret)))
|
||||
}
|
||||
}
|
||||
MetaOperation::Snapshot { all: false } => {
|
||||
garage_model::snapshot::async_snapshot_metadata(&self.garage).await?;
|
||||
|
|
Loading…
Add table
Reference in a new issue