proto: remotesapi: chunkstore.proto: Add a comment for PushConcurrencyControl.

This commit is contained in:
Aaron Son
2024-01-10 16:09:53 -08:00
parent b832e3bf9d
commit 5efbae4b5a
2 changed files with 34 additions and 0 deletions

View File

@@ -36,6 +36,23 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// A ChunkStore can request a client to implement a specific concurrency
// control mechanism when updating a branch HEAD.
//
// This exists because passive remotes, like DoltHub, typically do not have
// meaningful workingSets. When a client requests to push a branch HEAD to a
// DoltHub remote, they have no visibility into the workingSet/ value for the
// corresponding branch. It has historically been the case that clients ignore
// it and just push the branch HEAD.
//
// On the other hand, when pushing to a running sql-server, not stomping
// concurrent transaction is important, and the remote endpoint will want the
// pushing client to ensure that it both checks that the branch's working set
// is clean and that it updates the branch's working set appropriately if the
// push is successful.
//
// Servers advertise which concurrency control mechanism they want in their
// GetRepoMetadataResponse.
type PushConcurrencyControl int32
const (

View File

@@ -201,6 +201,23 @@ message GetRepoMetadataRequest {
string repo_path = 3;
}
// A ChunkStore can request a client to implement a specific concurrency
// control mechanism when updating a branch HEAD.
//
// This exists because passive remotes, like DoltHub, typically do not have
// meaningful workingSets. When a client requests to push a branch HEAD to a
// DoltHub remote, they have no visibility into the workingSet/ value for the
// corresponding branch. It has historically been the case that clients ignore
// it and just push the branch HEAD.
//
// On the other hand, when pushing to a running sql-server, not stomping
// concurrent transaction is important, and the remote endpoint will want the
// pushing client to ensure that it both checks that the branch's working set
// is clean and that it updates the branch's working set appropriately if the
// push is successful.
//
// Servers advertise which concurrency control mechanism they want in their
// GetRepoMetadataResponse.
enum PushConcurrencyControl {
PUSH_CONCURRENCY_CONTROL_UNSPECIFIED = 0;
PUSH_CONCURRENCY_CONTROL_IGNORE_WORKING_SET = 1;