On 19 Sep 2023, at 15:59, Sehen <ohse...@gmail.com> wrote:Dear all & Matthias Sohn, Luca MilanesioI am testing Primary and Replica gerrits with pull-replication.They are located between WAN network.Gerrit has about 1,800 repositories and pull-replication seems to work well usually.
But After Replica was shut down and started, It takes so long time to replicate refspec created during Replica was shut down. (Big size repository, 30GB)
Is it1. Is there a way to measure the time it takes to replicate data through a Broker(Kafka)?
If in case of through a broker, There is no logs in logs/pull-replication_log.
2. Is there a way to shorten replication time through Broker?
--
--
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/cc6d98cb-d2ae-47ef-b3eb-4b49d089cda6n%40googlegroups.com.
Hi Sehen,On 19 Sep 2023, at 15:59, Sehen <ohse...@gmail.com> wrote:Dear all & Matthias Sohn, Luca MilanesioI am testing Primary and Replica gerrits with pull-replication.They are located between WAN network.Gerrit has about 1,800 repositories and pull-replication seems to work well usually.Happy to hear that :-)But After Replica was shut down and started, It takes so long time to replicate refspec created during Replica was shut down. (Big size repository, 30GB)How many refs do you have?Typically the catch-up based on the broker messages is purely using the git fetch, which is influence by the number of the refs of both repositories.Is it1. Is there a way to measure the time it takes to replicate data through a Broker(Kafka)?The problem isn’t the broker, but the Git protocol and the JGit client / server implementation of it.
Hi, LucaThank you for your kind reply. And I feel sorry for my lack of knowledge about Pull-replication and Broker.I will try to measure how many refs to replicate.But Both gerrit(Primary and Replica) does not have 'message_log' file under $Gerrit_home/logs/ .Can you please check that There are some miss configurtions on my systems?1. Broker(Zookeeper & Kafka) is installed only on Primary2. events-kafka.jar plugin installed only on Primary.
3. [plugin "events-kafka"] config is only in Primary's gerrit.config
4. events-broker.jar installed on Primay and Replica both (under lib/)
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/1f5db486-bf53-4de5-a9bc-0fa937cb3836n%40googlegroups.com.
Dear all & Matthias Sohn, Luca Milanesio
I'm sorry for asking such detailed questions again.I'm testing Pull-replication with broker(events-kafka) as I said.However, there are one or two concernsabout it. I would appreciate it if someone could help me.1. I am concerned that when using kafka broker, there will be a risk of replication in the opposite direction (from Replica to Primary).Broker is installed only on Primary server, Primary & Replica's 'bootstrapServers' was set as same IP and port.
2. Should message_log be created inside Gerrit? message_log not found. Only there is message log in broker container(/var/lib/kafka/data/gerrit/)
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/9a6dba37-dca3-4f5d-b62a-15710f2494c0n%40googlegroups.com.
Hi Sehen,On Tue, 26 Sept 2023 at 09:38, Sehen <ohse...@gmail.com> wrote:Dear all & Matthias Sohn, Luca MilanesioI'm sorry for asking such detailed questions again.I'm testing Pull-replication with broker(events-kafka) as I said.However, there are one or two concernsabout it. I would appreciate it if someone could help me.1. I am concerned that when using kafka broker, there will be a risk of replication in the opposite direction (from Replica to Primary).Broker is installed only on Primary server, Primary & Replica's 'bootstrapServers' was set as same IP and port.Replicas are readonly nodes, hence they won't receive any write traffic. Thus the replication will only happen from the Primary to the Secondary node(s).For the Replica to consume messages you will need the broker to be installed there as well. You can find an example of a primary-replica setup with a broker here [1].Bear in mind that data replicated over the broker are just indexing, cache eviction, ref-updates, etc events. The git data is replicated, by the pull-replication plugin, via a git fetch and/or apply-object.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/CAPYXC5NP9H6tTcM30KBVr%2BvPwsmD--%2BSO785tcaU%2BxXya2LJQA%40mail.gmail.com.
Hi Fabio Ponciroli, Matthias Sohn
Thank you for your reply. I have some understanding of how pull-replication and brokers work.However, whenever there are changes to Gerrit (e.g. review comments), logs in binary format are accumulated inside the broker (/var/lib/kafka/data/gerrit-0/).
But Inside $GERRIT_SITE/logs the message_log still does not exist.
There are only pull-replication_log, error_log, sshd_log, and httpd_log.
Did I miss some settings? As I mentioned earlier, I am using a combination of pull-replication & broker & zookeeper and do not use multi-site plugins.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/f8b5b671-5351-4245-a84a-28f16201506en%40googlegroups.com.
Hi Sehen,On Wed, 27 Sept 2023 at 17:47, Sehen <ohse...@gmail.com> wrote:Hi Fabio Ponciroli, Matthias Sohn
Thank you for your reply. I have some understanding of how pull-replication and brokers work.However, whenever there are changes to Gerrit (e.g. review comments), logs in binary format are accumulated inside the broker (/var/lib/kafka/data/gerrit-0/).
But Inside $GERRIT_SITE/logs the message_log still does not exist.
There are only pull-replication_log, error_log, sshd_log, and httpd_log.
Did I miss some settings? As I mentioned earlier, I am using a combination of pull-replication & broker & zookeeper and do not use multi-site plugins.
Hi Sehen,On Wed, 27 Sept 2023 at 17:47, Sehen <ohse...@gmail.com> wrote:Hi Fabio Ponciroli, Matthias Sohn
Thank you for your reply. I have some understanding of how pull-replication and brokers work.However, whenever there are changes to Gerrit (e.g. review comments), logs in binary format are accumulated inside the broker (/var/lib/kafka/data/gerrit-0/).
But Inside $GERRIT_SITE/logs the message_log still does not exist.
There are only pull-replication_log, error_log, sshd_log, and httpd_log.
Did I miss some settings? As I mentioned earlier, I am using a combination of pull-replication & broker & zookeeper and do not use multi-site plugins.That's the reason why you don't see the message_log. It is produced by the multi-site, not the pull-replication plugin.Thanks,Ponch
On Thursday, September 28, 2023 at 5:03:41 PM UTC+2 Fabio Ponciroli wrote:Hi Sehen,On Wed, 27 Sept 2023 at 17:47, Sehen <ohse...@gmail.com> wrote:Hi Fabio Ponciroli, Matthias Sohn
Thank you for your reply. I have some understanding of how pull-replication and brokers work.However, whenever there are changes to Gerrit (e.g. review comments), logs in binary format are accumulated inside the broker (/var/lib/kafka/data/gerrit-0/).
But Inside $GERRIT_SITE/logs the message_log still does not exist.
There are only pull-replication_log, error_log, sshd_log, and httpd_log.
Did I miss some settings? As I mentioned earlier, I am using a combination of pull-replication & broker & zookeeper and do not use multi-site plugins.Hi Sehen,Do you need zookeeper? As far as I know you only need zookeeper to solve the split-brain problem that arise in a multi-site setup with multiple primaries.Hence, no zookeeper should be needed when you only have one primary.Best regards,David
That's the reason why you don't see the message_log. It is produced by the multi-site, not the pull-replication plugin.
Thank you Ponch,2023년 9월 29일 금요일 오전 12시 3분 41초 UTC+9에 Fabio Ponciroli님이 작성:Hi Sehen,On Wed, 27 Sept 2023 at 17:47, Sehen <ohse...@gmail.com> wrote:Hi Fabio Ponciroli, Matthias Sohn
Thank you for your reply. I have some understanding of how pull-replication and brokers work.However, whenever there are changes to Gerrit (e.g. review comments), logs in binary format are accumulated inside the broker (/var/lib/kafka/data/gerrit-0/).
But Inside $GERRIT_SITE/logs the message_log still does not exist.
There are only pull-replication_log, error_log, sshd_log, and httpd_log.
Did I miss some settings? As I mentioned earlier, I am using a combination of pull-replication & broker & zookeeper and do not use multi-site plugins.That's the reason why you don't see the message_log. It is produced by the multi-site, not the pull-replication plugin.Thanks,PonchUntil I received your answer, I thought my configuration was wrong and the message_log was not being created.
However, I now know that the log is not created unless I use the multi-site plugin.
As mentioned earlier, it is composed of only Pull-replication, Kafka broker, and Zookeeper, and with this configuration, Can I catch up with missing refs when Replica was offline.??
I'm not sure about that.And should I use 'consumeStreamEvents = true' or 'eventBrokerTopic = gerrit' in Pull-replication configuration to prevent missing refs when Replica was offline?
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/eaa7a5e4-3c24-4493-b8bf-27d82199a26cn%40googlegroups.com.
[95651bca] Replication from ssh://gerrit.com:29418/abc.git completed in 4140ms, 1000ms delay, 0 retries, E2E 5357ms
Apply object from primary for project abc, ref name refs/changes/70/455070/1 completed in 12ms
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/ef176a66-a9f4-484d-8d31-e76921e944c8n%40googlegroups.com.
If you want to see e2e time for apply-object you have to check pull_replication_log on the other node(gerrit.com:29418/)
Pull replication REST API apply object to http://gerrit.com/ COMPLETED for abc:refs/changes/70/455070/1 - [{commitObject=aaaaabbbb ... (COMMIT) treeObject=cccddd... , HTTP Result: OK - time:11496.518613 ms
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/99a63b7c-7c0d-4a97-9017-e58c73720a77n%40googlegroups.com.