Make auto_heal real: peer-fetch corrupted_object with verified swap, poison-fallback on no peer

This commit is contained in:
2026-04-25 17:14:38 +08:00
parent dd1e6d0409
commit 3a590e6639
14 changed files with 1670 additions and 274 deletions

View File

@@ -29,6 +29,7 @@ pub enum S3ErrorCode {
NoSuchUpload,
NoSuchVersion,
NoSuchTagSet,
ObjectCorrupted,
PreconditionFailed,
NotModified,
QuotaExceeded,
@@ -68,6 +69,7 @@ impl S3ErrorCode {
Self::NoSuchUpload => 404,
Self::NoSuchVersion => 404,
Self::NoSuchTagSet => 404,
Self::ObjectCorrupted => 500,
Self::PreconditionFailed => 412,
Self::NotModified => 304,
Self::QuotaExceeded => 403,
@@ -107,6 +109,7 @@ impl S3ErrorCode {
Self::NoSuchUpload => "NoSuchUpload",
Self::NoSuchVersion => "NoSuchVersion",
Self::NoSuchTagSet => "NoSuchTagSet",
Self::ObjectCorrupted => "ObjectCorrupted",
Self::PreconditionFailed => "PreconditionFailed",
Self::NotModified => "NotModified",
Self::QuotaExceeded => "QuotaExceeded",
@@ -148,6 +151,7 @@ impl S3ErrorCode {
Self::NoSuchUpload => "The specified multipart upload does not exist",
Self::NoSuchVersion => "The specified version does not exist",
Self::NoSuchTagSet => "The TagSet does not exist",
Self::ObjectCorrupted => "The stored object is corrupted and cannot be served",
Self::PreconditionFailed => "At least one of the preconditions you specified did not hold",
Self::NotModified => "Not Modified",
Self::QuotaExceeded => "The bucket quota has been exceeded",