hunt down the cancelled within createimagelayerserror

This commit is contained in:
Joonas Koivunen
2024-08-08 13:02:59 +00:00
parent cbe8c77997
commit 0ba5b4daeb

View File

@@ -742,11 +742,15 @@ pub(crate) enum WaitLsnError {
impl From<CreateImageLayersError> for CompactionError {
fn from(e: CreateImageLayersError) -> Self {
match e {
CreateImageLayersError::Cancelled => CompactionError::ShuttingDown,
CreateImageLayersError::Cancelled
| CreateImageLayersError::GetVectoredError(GetVectoredError::Cancelled)
| CreateImageLayersError::PageReconstructError(PageReconstructError::Cancelled) => {
CompactionError::ShuttingDown
}
CreateImageLayersError::Other(e) => {
CompactionError::Other(e.context("create image layers"))
}
_ => CompactionError::Other(e.into()),
value => CompactionError::Other(value.into()),
}
}
}