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:16 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-01-25 09:36:35 +0300
commit37a366ee814d1d89d60f1fa2fa8f5c8c47ab6baa (patch)
treee3e0e1af75e45a6e26c8dfd0d4aef10c0250ba52 /proto/operations.proto
parentc24315695b2fc5c597b40a7efbe89570b048c9a6 (diff)
operations: Allow UserRevert to get an optional timestamp
The UserRevert 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 000c0e34a..d99d3d4df 100644
--- a/proto/operations.proto
+++ b/proto/operations.proto
@@ -394,6 +394,9 @@ message UserRevertRequest {
Repository start_repository = 7;
// dry_run will compute the revert, 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 UserRevertResponse {