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:31 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-01-25 09:38:05 +0300
commita795eae4075815b9bf9d157c89e918a3a383a86e (patch)
treec8c25e12b0f9796ebf47942418e5c37dfa027023 /proto/operations.proto
parent37a366ee814d1d89d60f1fa2fa8f5c8c47ab6baa (diff)
operations: Allow UserSquash to get an optional timestamp
The UserSquash 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 d99d3d4df..f17aa7300 100644
--- a/proto/operations.proto
+++ b/proto/operations.proto
@@ -620,6 +620,9 @@ message UserSquashRequest {
User author = 7;
// commit_message is the message to be used for the squashed commit.
bytes commit_message = 8;
+ // timestamp is the optional timestamp to use for the squashed commit as
+ // committer date. If it's not set, the current time will be used.
+ google.protobuf.Timestamp timestamp = 9;
}
message UserSquashResponse {