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:
Diffstat (limited to 'internal/praefect/transactions/subtransaction.go')
-rw-r--r--internal/praefect/transactions/subtransaction.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/praefect/transactions/subtransaction.go b/internal/praefect/transactions/subtransaction.go
index 87b0ae1b0..056c2b38c 100644
--- a/internal/praefect/transactions/subtransaction.go
+++ b/internal/praefect/transactions/subtransaction.go
@@ -7,6 +7,7 @@ import (
"sync"
"gitlab.com/gitlab-org/gitaly/v14/internal/transaction/voting"
+ "google.golang.org/grpc/metadata"
)
// VoteResult represents the outcome of a transaction for a single voter.
@@ -298,6 +299,11 @@ func (t *subtransaction) collectVotes(ctx context.Context, node string) error {
return ctx.Err()
}
+ md, ok := metadata.FromIncomingContext(ctx)
+ if ok {
+ fmt.Printf("=== Got transaction context: %v\n", md)
+ }
+
switch voter.result {
case VoteCommitted:
// Happy case, we are part of the quorum.