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/coordinator.go')
-rw-r--r--internal/praefect/coordinator.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/praefect/coordinator.go b/internal/praefect/coordinator.go
index 8c97df7a6..565ffae7d 100644
--- a/internal/praefect/coordinator.go
+++ b/internal/praefect/coordinator.go
@@ -34,6 +34,17 @@ func getReplicationDetails(methodName string, m proto.Message) (datastore.Change
}
}
+var doNotReplicate = map[string]struct{}{
+ "/gitaly.RepositoryService/GarbageCollect": struct{}{},
+ "/gitaly.RepositoryService/RepackFull": struct{}{},
+ "/gitaly.RepositoryService/RepackIncremental": struct{}{},
+}
+
+func skipReplication(fullMethodName string) bool {
+ _, ok := doNotReplicate[fullMethodName]
+ return ok
+}
+
// Coordinator takes care of directing client requests to the appropriate
// downstream server. The coordinator is thread safe; concurrent calls to
// register nodes are safe.
@@ -85,6 +96,10 @@ func (c *Coordinator) directRepositoryScopedMessage(ctx context.Context, mi prot
var requestFinalizer func()
+ if skipReplication(fullMethodName) {
+ return proxy.NewStreamParameters(ctx, primary.GetConnection(), requestFinalizer, nil), nil
+ }
+
if mi.Operation == protoregistry.OpMutator {
change, params, err := getReplicationDetails(fullMethodName, m)
if err != nil {