From bdedc5931b3c2e6c75d8d7e0fca88df4d20f94df Mon Sep 17 00:00:00 2001 From: sylvain senechal Date: Thu, 21 May 2026 17:44:55 +0200 Subject: [PATCH 1/2] Add new headers for CRR Cascaded Issue: CLDSRVCLT-14 --- models/backbeatRoutes/putMetadata.smithy | 26 +++++++++++++++++++++--- models/backbeatRoutes/putdata.smithy | 21 +++++++++++++++++-- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/models/backbeatRoutes/putMetadata.smithy b/models/backbeatRoutes/putMetadata.smithy index 2aa181d9..0e6d937c 100644 --- a/models/backbeatRoutes/putMetadata.smithy +++ b/models/backbeatRoutes/putMetadata.smithy @@ -4,7 +4,8 @@ namespace cloudserver.backbeatRoutes @http(method: "PUT", uri: "/_/backbeat/metadata/{Bucket}/{Key+}") operation PutMetadata { input: PutMetadataInput, - output: PutMetadataOutput + output: PutMetadataOutput, + errors: [StaleMicroVersionIdException] } structure PutMetadataInput { @@ -33,12 +34,31 @@ structure PutMetadataInput { @httpHeader("X-Scal-Request-Uids") RequestUids: String, - + + @httpHeader("x-scal-micro-version-id") + MicroVersionId: String, + @httpPayload Body: Blob } structure PutMetadataOutput { /// Version ID of the stored metadata - versionId: String + versionId: String, + + @httpHeader("x-scal-replication-loop") + replicationLoop: Boolean +} + +/// Returned by PutMetadata when the incoming microVersionId is older than +/// the destination's current value (stale cascade event). The write is not +/// applied; the caller should mark the replication as FAILED (non-retryable). +@error("client") +@httpError(409) +structure StaleMicroVersionIdException { + @required + message: String, + + @httpHeader("x-scal-micro-version-id") + microVersionId: String } \ No newline at end of file diff --git a/models/backbeatRoutes/putdata.smithy b/models/backbeatRoutes/putdata.smithy index 45e45780..616eb15c 100644 --- a/models/backbeatRoutes/putdata.smithy +++ b/models/backbeatRoutes/putdata.smithy @@ -7,7 +7,8 @@ use aws.auth#unsignedPayload @unsignedPayload operation PutData { input: PutDataInput, - output: PutDataOutput + output: PutDataOutput, + errors: [VersionIdCollisionException] } structure PutDataInput { @@ -31,6 +32,9 @@ structure PutDataInput { @httpHeader("X-Scal-Request-Uids") RequestUids: String, + @httpHeader("x-scal-version-id") + VersionId: String, + @httpPayload @default("") Body: StreamingBlob @@ -45,7 +49,20 @@ structure PutDataOutput { @httpHeader("x-amz-server-side-encryption-customer-algorithm") SSECustomerAlgorithm: String, - + @httpHeader("x-amz-server-side-encryption-aws-kms-key-id") SSEKMSKeyId: String +} + +/// Returned by PutData when the destination already has an object at this +/// versionId. The existing microVersionId is included in the response header +/// so the caller can run the cascade loop/stale/proceed classification. +@error("client") +@httpError(409) +structure VersionIdCollisionException { + @required + message: String, + + @httpHeader("x-scal-micro-version-id") + microVersionId: String } \ No newline at end of file From 94c822c357fb991502a1ba2213bdb594d064e3d3 Mon Sep 17 00:00:00 2001 From: sylvain senechal Date: Thu, 21 May 2026 17:45:51 +0200 Subject: [PATCH 2/2] Bump version to 1.0.9 Issue: CLDSRVCLT-14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae3075ec..bdee3da1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@scality/cloudserverclient", - "version": "1.0.8", + "version": "1.0.9", "engines": { "node": ">=20" },