Pull replication plugin didn’t automatically index change

20 views
Skip to first unread message

Kai Lei

unread,
Jul 18, 2024, 6:00:04 PM (4 days ago) Jul 18
to Repo and Gerrit Discussion
Hi,

I have 2 gerrit nodes gc-01 and gc-02. gc-01 is a write note and gc-02 is a read-only node. I have configured multi-site with pull replication plugin + haproxy.

 

When the user updates 348842 with new comments via browser, I can see the change meta data is synced from gc-01 to gc-02 which has no issue.

 

But when I refresh the gerrit GUI main page via browser, 348842 is not showing up as the most recent change, but refresh again, it shows up.

 

When I query via restAPI, I can see gc-02 didn’t index 348842

 

curl -n -s http://dc2-git-gc-01:8089/r/a/changes/?q=status:open+-is:wip&n=1 |tail -1 | jq . | grep _number;

    "_number": 348842,

curl -n -s http://dc2-git-gc-02:8089/r/a/changes/?q=status:open+-is:wip&n=1 |tail -1 | jq . | grep _number

"_number": 348153,


After I run the index command manually "ssh -p 12001 dc2-git-gc-02 gerrit index changes 348582", it looks all good.


curl -n -s http://dc2-git-gc-01:8089/r/a/changes/?q=status:open+-is:wip&n=1 |tail -1 | jq . | grep _number;

    "_number": 348842, 

curl -n -s http://dc2-git-gc-02:8089/r/a/changes/?q=status:open+-is:wip&n=1 |tail -1 | jq . | grep _number

    "_number": 348842,

 

I copied replication.config from https://gerrit.googlesource.com/plugins/pull-replication/+/refs/heads/stable-3.8/example-setup/

 

[gerrit]

    autoReload = true

    replicateOnStartup = false

[replication]

    excludeRefs = ^refs/users/\\d\\d/\\d+/edit-\\d+/\\d+$

    lockErrorMaxRetries = 5

    maxRetries = 100

    useCGitClient = false

    consumeStreamEvents = false

    eventBrokerTopic = gerrit

    syncRefs = "ALL REFS ASYNC"

    maxApiPayloadSize = 40000

[remote "gc-01"]

    url = git://dc2-git-gc-01:9418/${name}.git

    apiUrl = http://dc2-git-gc-01:8089/r

    fetch = +refs/*:refs/*

    mirror = true

    timeout = 60 # In seconds

    connectionTimeout = 120000 # In mseconds

    rescheduleDelay = 15

    replicationDelay = 1

    threads = 4

    createMissingRepositories = true

    replicateProjectDeletions = true

    replicateHiddenProjects = true

tagopt = --no-tags

 

Could you please let me know what I missed?


Thanks

BR
    Leon

Kai Lei

unread,
Jul 19, 2024, 1:12:25 AM (3 days ago) Jul 19
to Repo and Gerrit Discussion
Please ignore this falas alarm, I just found I used same kafla group id for both of nodes, silly me!!!
Reply all
Reply to author
Forward
0 new messages