Gerrit pull-replication plugin automatically sync?

272 views
Skip to first unread message

Rain JJ

unread,
Mar 25, 2024, 3:01:05 AM3/25/24
to Repo and Gerrit Discussion
Dear all:
    I recently deployed Gerrit(3.8) multi-site. 
Currently, only 2 master R/W nodes are configured, and the following plugins are installed:
multi-site
events-rabbitmq
pull-replication
websession-broker
zookeeper-refdb

Two master R/W nodes A and B.
Now I push a change to A, but it is found that B is not synchronized (Web UI page does not have this change).
However, after I manually execute ‘ssh gerrit pull-replication start’ on node B, the change are synchronized to node B.

Why is this? Shouldn’t it be automatically synchronized to B?

Looking forward to your reply!

Daniele Sassoli

unread,
Mar 25, 2024, 5:03:09 AM3/25/24
to Rain JJ, Repo and Gerrit Discussion
Hi,

What does your pull-replication config look like?
Are there any errors in the log?


Looking forward to your reply!

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/517ea2a1-ed82-4d3c-89a5-3e70642ed4e1n%40googlegroups.com.

Rain JJ

unread,
Mar 25, 2024, 7:21:07 AM3/25/24
to Repo and Gerrit Discussion
Sorry I forgot to upload the information !

When I push a  change to Maser A:

master  A replication.config:
[gerrit]
    autoReload = true
    replicatePermissions = true
    replicateOnStartup = false
[replication]
    lockErrorMaxRetries = 5
    maxRetries = 5
    userCGitClient = false
    consumeStreamEvents = false
    syncRefs = "ALL REFS ASYNC"
    maxApiPayloadSize = 40000
    excludeRefs = refs/multi-site/version
[remote "push_masterB"]
    url = master_B:/data/gerrit_multisite/review_site/git/${name}.git
    fetch = +refs/*:refs/*
    mirror = true
    timeout = 600
    rescheduleDelay = 2
    replicationDelay = 2
    createMissingRepositories = true
    replicateProjectDeletions = true
    replicateHiddenProjects = true
    replicatePermissions = true

master  B replication.config:
[gerrit]
    autoReload = true
    replicatePermissions = true
    replicateOnStartup = false
[replication]
    lockErrorMaxRetries = 5
    maxRetries = 5
    userCGitClient = false
    consumeStreamEvents = false
    syncRefs = "ALL REFS ASYNC"
    maxApiPayloadSize = 40000
    excludeRefs = refs/multi-site/version
[remote "push_masterA"]
    url = master_A:/data/gerrit_multisite/review_site/git/${name}.git
    fetch = +refs/*:refs/*
    mirror = true
    timeout = 600
    rescheduleDelay = 2
    replicationDelay = 2
    createMissingRepositories = true
    replicateProjectDeletions = true
    replicateHiddenProjects = true
    replicatePermissions = true


Master A gerrit logs:
[2024-03-25T09:22:28.603Z] [ReceiveCommits-1[java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@7ef3822[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@928c777[Wrapped task = com.google.gerrit.server.logging.LoggingContextAwareRunnable@2e79db5b]]]-for-SSH git-receive-pack /test1 (jjran)] INFO  com.googlesource.gerrit.plugins.hooks.HookFactory : hooks.commitReceivedHook resolved to /var/gerrit/hooks/commit-received [CONTEXT RECEIVE_ID="test1-1711358548558-2022428c" project="test1" request="GIT_RECEIVE" ]
[2024-03-25T09:22:28.656Z] [ReceiveCommits-1[java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@7ef3822[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@928c777[Wrapped task = com.google.gerrit.server.logging.LoggingContextAwareRunnable@2e79db5b]]]-for-SSH git-receive-pack /test1 (jjran)] WARN  org.apache.curator.utils.ZKPaths : The version of ZooKeeper being used doesn't support Container nodes. CreateMode.PERSISTENT will be used instead.
[2024-03-25T09:22:29.054Z] [SSH git-receive-pack /test1 (jjran)] INFO  com.google.gerrit.server.git.MultiProgressMonitor : Processing changes: new: 1 (\) [CONTEXT ratelimit_period="1 MINUTES" ]
[2024-03-25T09:22:29.373Z] [ReceiveCommits-1[java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@7ef3822[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@928c777[Wrapped task = com.google.gerrit.server.logging.LoggingContextAwareRunnable@2e79db5b]]]-for-SSH git-receive-pack /test1 (jjran)] INFO  com.googlesource.gerrit.plugins.hooks.HookFactory : hooks.patchsetCreatedHook resolved to /var/gerrit/hooks/patchset-created [CONTEXT RECEIVE_ID="test1-1711358548558-2022428c" project="test1" request="GIT_RECEIVE" ]
 

Master A pull-replication.log:
[2024-03-25 09:22:28,794] Ref event received: UPDATE on project All-Projects:refs/multi-site/version - 90cd478602ab16fda026e945a9f120cd18a020da => 472eeb9ba66e53a040346e3af77797887df85a18
[2024-03-25 09:22:28,797] RevisionData is {  blobs=[472eeb9ba66e53a040346e3af77797887df85a18 (BLOB)]} for All-Projects:refs/multi-site/version
[2024-03-25 09:22:28,806] Ref event received: UPDATE on project All-Projects:refs/sequences/changes - acfba60953b290b6622b2d1f53721968aa77ebf9 => 7f3a7cc66c28f7ce9fa4e69a9fcc5e8f03bbad1b
[2024-03-25 09:22:28,807] RevisionData is {  blobs=[7f3a7cc66c28f7ce9fa4e69a9fcc5e8f03bbad1b (BLOB)]} for All-Projects:refs/sequences/changes
[2024-03-25 09:22:29,336] Ref event received: UPDATE on project test1:refs/multi-site/version - 03676321eddf88ab63a7d51586378d61eeba8fbb => 570b02ea6e41201c21242f5d13154211d468552c
[2024-03-25 09:22:29,337] RevisionData is {  blobs=[570b02ea6e41201c21242f5d13154211d468552c (BLOB)]} for test1:refs/multi-site/version
[2024-03-25 09:22:29,340] Ref event received: CREATE on project test1:refs/changes/41/141/1 - 0000000000000000000000000000000000000000 => f466c704d87588231c92374f10ff8c3320239afd
[2024-03-25 09:22:29,342] RevisionData is {commitObject=f466c704d87588231c92374f10ff8c3320239afd (COMMIT) treeObject=7b8c83e2033db7792a1c3f5bb9ef5f21d1d1b8c4 (TREE) blobs=[6749de23b13c06430acbfa98e7016ccb102b853d (BLOB)]} for test1:refs/changes/41/141/1
[2024-03-25 09:22:29,345] Ref event received: CREATE on project test1:refs/changes/41/141/meta - 0000000000000000000000000000000000000000 => 270e8e03212a61c5a0b2a825fba9d83b14d336e2
[2024-03-25 09:22:29,345] RevisionData is {commitObject=270e8e03212a61c5a0b2a825fba9d83b14d336e2 (COMMIT) treeObject=4b825dc642cb6eb9a060e54bf8d69288fbee4904 (TREE) } for test1:refs/changes/41/141/meta

Master B gerrit log:
No logs

Master B pull-replication.log:
No logs

Marcin Czech

unread,
Mar 25, 2024, 7:41:56 AM3/25/24
to Rain JJ, Repo and Gerrit Discussion
Reply all
Reply to author
Forward
0 new messages