Skip to content

Commit 6810bc3

Browse files
committed
clean up
Clarified the requirements for chunked uploads in the RPC documentation.
1 parent 6d71426 commit 6810bc3

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

build/bazel/remote/execution/v2/remote_execution.proto

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ service ContentAddressableStorage {
440440
option (google.api.http) = { get: "/v2/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree" };
441441
}
442442

443-
// Split retrieves information about how a blob is split into chunks.
443+
// SplitBlob retrieves information about how a blob is split into chunks.
444444
//
445445
// This call returns information about how a blob is split into chunks, and
446446
// returns a list of the chunk digests. Using the returned list of chunk digests,
@@ -450,10 +450,9 @@ service ContentAddressableStorage {
450450
// available in the CAS.
451451
//
452452
// This API can be used to reduce the required data to download a large blob
453-
// from CAS if chunks from earlier downloads of a different version of this
454-
// blob are locally available. For this procedure to work properly, blobs
455-
// SHOULD be split in a content-defined way, rather than with fixed-sized
456-
// chunking.
453+
// from CAS if some chunks from similar blobs are locally available. For this
454+
// procedure to work properly, blobs should be split in a content-defined way,
455+
// rather than with fixed-sized chunking.
457456
//
458457
// If a split request is answered successfully, a client can expect the
459458
// following guarantees from the server:
@@ -501,20 +500,17 @@ service ContentAddressableStorage {
501500
option (google.api.http) = { get: "/v2/{instance_name=**}/blobs/{blob_digest.hash}/{blob_digest.size_bytes}:splitBlob" };
502501
}
503502

504-
// Splice tells the CAS how chunks can compose a blob.
503+
// SpliceBlob tells the CAS how chunks can compose a blob.
505504
//
506505
// This is the complementary operation to the
507506
// [ContentAddressableStorage.SplitBlob][build.bazel.remote.execution.v2.ContentAddressableStorage.SplitBlob]
508507
// function to handle the chunked upload of large blobs to save upload
509508
// traffic.
510509
//
511510
// When uploading a large blob using chunked upload, clients MUST first upload
512-
// all chunks to the CAS, then call this RPC to store how those chunks compose
513-
// the original blob. The chunks referenced in the manifest SHOULD be available
514-
// in the CAS before calling this RPC. The original blob does not need to be
515-
// available: the correctness of the manifest can be validated from manifest
516-
// correctness and by verifying that the chunks assembled match the original
517-
// digest.
511+
// all chunks to the CAS, then call this RPC to tell the server how those chunks
512+
// compose the original blob. The chunks referenced in SpliceBlob call SHOULD be
513+
// available in the CAS before calling this RPC.
518514
//
519515
// If a client needs to upload a large blob and is able to split a blob into
520516
// chunks in such a way that reusable chunks are obtained, e.g., by means of
@@ -538,17 +534,14 @@ service ContentAddressableStorage {
538534
// construct the blob from chunks is available. In such cases, the lifetime of
539535
// that blob or the chunks SHOULD be extended as usual. If the client-specified
540536
// blob is not already in the CAS, the server SHOULD verify that the digest of
541-
// the newly created blob matches the digest specified by the client, and reject
542-
// the request if they differ.
537+
// the newly created blob assembled from chunks matches the digest specified by
538+
// the client, and reject the request if they differ.
543539
//
544540
// When blob splitting and splicing is used at the same time, the clients and
545541
// the server SHOULD agree out-of-band upon a chunking algorithm used by both
546542
// parties to benefit from each others chunk data and avoid unnecessary data
547543
// duplication.
548544
//
549-
// After a successful SpliceBlob call, a subsequent SplitBlob call for the same
550-
// blob digest SHOULD retrieve the same list of chunk digests.
551-
//
552545
// Errors:
553546
//
554547
// * `NOT_FOUND`: At least one of the blob chunks is not present in the CAS.
@@ -2020,6 +2013,8 @@ message SpliceBlobRequest {
20202013
// 2. It allows servers with different storage backends to dispatch the
20212014
// request to the correct storage backend based on the size and/or the
20222015
// hash of the blob.
2016+
// 3. It allows the server to check if existing chunking information is
2017+
// available for the blob.
20232018
Digest blob_digest = 2;
20242019

20252020
// The ordered list of digests of the chunks which need to be concatenated to

0 commit comments

Comments
 (0)