diff options
author | John Cai <jcai@gitlab.com> | 2021-12-13 18:58:21 +0300 |
---|---|---|
committer | John Cai <jcai@gitlab.com> | 2021-12-13 18:58:21 +0300 |
commit | 15a1323ae16dffd3ba6b078f6cb81e283a96c72d (patch) | |
tree | 64e7810c28e3e27fc2245924619fab0888ec1998 /internal | |
parent | 896612200106b19068dfdb4f8f67de0dd4807c0a (diff) | |
parent | dffc3458ce32ede5ccfea0ade0282962b3370d38 (diff) |
Merge branch 'jc-replicate-immediately' into 'master'
praefect: replicate immediately after track-repository
Closes #3892 and #3909
See merge request gitlab-org/gitaly!4183
Diffstat (limited to 'internal')
-rw-r--r-- | internal/praefect/replicator.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/praefect/replicator.go b/internal/praefect/replicator.go index 09f797d15..2660373fe 100644 --- a/internal/praefect/replicator.go +++ b/internal/praefect/replicator.go @@ -440,7 +440,7 @@ func WithParallelStorageProcessingWorkers(n uint) func(*ReplMgr) { // NewReplMgr initializes a replication manager with the provided dependencies // and options -func NewReplMgr(log *logrus.Entry, storageNames map[string][]string, queue datastore.ReplicationEventQueue, rs datastore.RepositoryStore, hc HealthChecker, nodes NodeSet, opts ...ReplMgrOpt) ReplMgr { +func NewReplMgr(log logrus.FieldLogger, storageNames map[string][]string, queue datastore.ReplicationEventQueue, rs datastore.RepositoryStore, hc HealthChecker, nodes NodeSet, opts ...ReplMgrOpt) ReplMgr { r := ReplMgr{ log: log.WithField("component", "replication_manager"), queue: queue, @@ -780,6 +780,11 @@ func (r ReplMgr) backfillReplicaPath(ctx context.Context, event datastore.Replic } } +// ProcessReplicationEvent processes a single replication event given the target client connection +func (r ReplMgr) ProcessReplicationEvent(ctx context.Context, event datastore.ReplicationEvent, targetCC *grpc.ClientConn) error { + return r.processReplicationEvent(ctx, event, targetCC) +} + func (r ReplMgr) processReplicationEvent(ctx context.Context, event datastore.ReplicationEvent, targetCC *grpc.ClientConn) error { var cancel func() |