From 7c543076c74843d35aea8967d7e67e8f5b9fe562 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Thu, 15 Feb 2024 09:15:54 +0100 Subject: [PATCH] Reinstated lock_id and added comments for clarification --- cs3/storage/provider/v1beta1/provider_api.proto | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cs3/storage/provider/v1beta1/provider_api.proto b/cs3/storage/provider/v1beta1/provider_api.proto index ddfd3f8..e3dc04c 100644 --- a/cs3/storage/provider/v1beta1/provider_api.proto +++ b/cs3/storage/provider/v1beta1/provider_api.proto @@ -75,9 +75,11 @@ service ProviderAPI { // Initiates the download of a file using an // out-of-band data transfer mechanism. rpc InitiateFileDownload(InitiateFileDownloadRequest) returns (InitiateFileDownloadResponse); - // Initiates the upload of a file using an out-of-band - // data transfer mechanism. Locking MUST be handled by - // the data transfer protocol returned in response. + // Initiates the upload of a file using an out-of-band data + // transfer mechanism. SHOULD return CODE_FAILED_PRECONDITION + // if the reference is already locked with a mismatched lock. + // Additionally, lock checks MUST be enforced by the data + // transfer protocol returned in response. rpc InitiateFileUpload(InitiateFileUploadRequest) returns (InitiateFileUploadResponse); // Returns the list of grants for the provided reference. // MUST return CODE_NOT_FOUND if the reference does not exists. @@ -370,6 +372,11 @@ message InitiateFileUploadRequest { // return CODE_FAILED_PRECONDITION. cs3.types.v1beta1.Timestamp if_unmodified_since = 6; } + // OPTIONAL. + // A lock_id: should the reference exist and be locked, the stored + // lock_id SHOULD be equal to the given value. Additionally, the + // check MUST be enforced by the out-of-band transfer protocol. + string lock_id = 5; } message InitiateFileUploadResponse {