diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-01-21 11:33:21 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-01-25 09:34:43 +0300 |
commit | c24315695b2fc5c597b40a7efbe89570b048c9a6 (patch) | |
tree | 3c360f39f6ca4c5d4e4cb5ad3c525921ceaf6b8f /proto/operations.proto | |
parent | 73ffa08745a23b0dfcd9ca21da9cdc8a59f4046e (diff) |
operations: Allow UserCommitFiles to get an optional timestamp
The UserCommitFiles 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.proto | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/operations.proto b/proto/operations.proto index db6300803..000c0e34a 100644 --- a/proto/operations.proto +++ b/proto/operations.proto @@ -509,6 +509,9 @@ message UserCommitFilesRequestHeader { // start_sha specifies the SHA of the commit to use as the parent of new commit. Takes priority // over start_branch_name and branc_name. Optional. string start_sha = 10; + // timestamp is the optional timestamp to use for the commits as author and + // committer date. If it's not set, the current time will be used. + google.protobuf.Timestamp timestamp = 11; } // UserCommitFiles is the request of UserCommitFiles. |