Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-01-25 09:18:07 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-01-25 09:27:21 +0300
commit73ffa08745a23b0dfcd9ca21da9cdc8a59f4046e (patch)
treec73b14d05da535c4dd60f263c0c1f72c9613856d /proto/operations.proto
parent9c32a62d652f7ed90d954a5e14fa8bb82e3ff352 (diff)
operations: Allow UserCherryPick to get an optional timestamp
The UserCherryPick RPC is currently not deterministic with regards to the created commits because they contain a timestamp, which is by default the creation time. This breaks transactions, as when multiple Gitalies now try to process the same request in parallel, the likelihood is very high that they'll end up with different commit IDs. Fix the issue by introducing a new optional "timestamp" field to the request. If set, it will be used instead of the current system time. This is only the first half of the fix, the second one will require us to inject a single timestamp in Rails.
Diffstat (limited to 'proto/operations.proto')
-rw-r--r--proto/operations.proto3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/operations.proto b/proto/operations.proto
index a21ec3223..db6300803 100644
--- a/proto/operations.proto
+++ b/proto/operations.proto
@@ -339,6 +339,9 @@ message UserCherryPickRequest {
Repository start_repository = 7;
// dry_run will compute the cherry-pick, but not update the target branch.
bool dry_run = 8;
+ // timestamp is the optional timestamp to use for the created cherry-picked
+ // commit's committer date. If it's not set, the current time will be used.
+ google.protobuf.Timestamp timestamp = 9;
}
message UserCherryPickResponse {