diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-06-11 15:23:14 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-06-14 12:36:24 +0300 |
commit | b19bbb1bd9b0bf4263ef9bfefa99ad92e421e62d (patch) | |
tree | 0182d51ac49a2b2b60de38ae37d7104366730db1 /internal/gitaly/service/repository/apply_gitattributes.go | |
parent | b60c07b755635815a9dddf1c618d4bc592544e83 (diff) |
transaction: Drop server info from voting functions
We do not need the Praefect server info in any of the transactional
voting functions anymore given that we now always use the backchannel,
and the backchannel ID is redundantly encoded both in the Praefect
server structure and in the transaction information. Drop the Praefect
server parameter from voting functions.
Diffstat (limited to 'internal/gitaly/service/repository/apply_gitattributes.go')
-rw-r--r-- | internal/gitaly/service/repository/apply_gitattributes.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/internal/gitaly/service/repository/apply_gitattributes.go b/internal/gitaly/service/repository/apply_gitattributes.go index c759414b9..231894762 100644 --- a/internal/gitaly/service/repository/apply_gitattributes.go +++ b/internal/gitaly/service/repository/apply_gitattributes.go @@ -98,11 +98,6 @@ func (s *server) vote(ctx context.Context, oid git.ObjectID) error { return nil } - praefect, err := txinfo.PraefectFromContext(ctx) - if err != nil { - return fmt.Errorf("vote has invalid Praefect info: %w", err) - } - hash, err := oid.Bytes() if err != nil { return fmt.Errorf("vote with invalid object ID: %w", err) @@ -113,7 +108,7 @@ func (s *server) vote(ctx context.Context, oid git.ObjectID) error { return fmt.Errorf("cannot convert OID to vote: %w", err) } - if err := s.txManager.Vote(ctx, tx, *praefect, vote); err != nil { + if err := s.txManager.Vote(ctx, tx, vote); err != nil { return fmt.Errorf("vote failed: %w", err) } |