Thanks in advance!Hakan.
Thanks in advance!Hakan.--
--
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/2f7d8cb0-8994-4cde-8dbb-71ac42bf0499n%40googlegroups.com.
Thanks in advance!Hakan.--
--
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/da7d8fff-c030-4326-ba01-b6db4ae62032n%40googlegroups.com.
On 19 Apr 2024, at 15:09, Daniele Sassoli <daniele...@gmail.com> wrote:On Friday 19 April 2024 at 14:54:48 UTC+1 Hakan AVCI wrote:Hello Everyone,I have been trying to upgrade our Gerrit instance from 3.5.2 to 3.8.3 on our staging instance with whole data replicated from Prod instance to mimic production upgrade. Everything is fine except only one issue which is reindex is not getting completed due to one of the repositories that I found after many reindex tries :)Workaround was for me to move this bare repo out of the git folder that is inside of the Gerrit home_folder (original location) to somewhere else, then offline reindex that followed by init process, was successful. I had to do this because otherwise Gerrit would never start due to incomplete index. But for sure, I have to make all changes of this repo are visible in UI anyway. However, online reindex also act like offline so it's getting stuck somewhere while it's trying to index changes for that problematic repo I have mentioned. Result was the same when I delete whole index folder and run reindex to let Gerrit creates indexes from scratch. I also ran git gc in aggressive mode (takes around 2 hours to complete) but this did not help either. This repo, unfortunately, contains lots of binaries and its current size is around 14G.My question is how can I get more info about reindex process ( --verbose in offline reindex did not really help to figure this out ), what is it doing and how can I see which exact change is causing this issue?Running git fsck on the repo might be a good first step.
Also keep in mind that when updating from 3.5 to 3.8 you will first need to upgrade to 3.6 to run the copy-approvals command.Good point, how did you perform the upgrade?If you check my presentation of Gerrit v3.8 at the last Gerrit User Summit (10:09) on the GerritForge’s TV channel, you’ll see that it says:- Upgrade to v3.5- Run copy-approval- Upgrade to v3.8Did you run the copy-approval tool?
On Fri, Apr 19, 2024 at 3:54 PM Hakan AVCI <hakana...@gmail.com> wrote:Hello Everyone,I have been trying to upgrade our Gerrit instance from 3.5.2 to 3.8.3 on our staging instance with whole data replicated from Prod instance to mimic production upgrade. Everything is fine except only one issue which is reindex is not getting completed due to one of the repositories that I found after many reindex tries :)Workaround was for me to move this bare repo out of the git folder that is inside of the Gerrit home_folder (original location) to somewhere else, then offline reindex that followed by init process, was successful. I had to do this because otherwise Gerrit would never start due to incomplete index. But for sure, I have to make all changes of this repo are visible in UI anyway. However, online reindex also act like offline so it's getting stuck somewhere while it's trying to index changes for that problematic repo I have mentioned. Result was the same when I delete whole index folder and run reindex to let Gerrit creates indexes from scratch. I also ran git gc in aggressive mode (takes around 2 hours to complete) but this did not help either. This repo, unfortunately, contains lots of binaries and its current size is around 14G.My question is how can I get more info about reindex process ( --verbose in offline reindex did not really help to figure this out ), what is it doing and how can I see which exact change is causing this issue?Did you provide enough heap and CPUs to the reindexing ?
Did you observe Java gc activity during reindexing ?
On a huge repo with limited heap and CPUs you could overload the JVM so that it's mostly busy running Java gc.
On large repos you may need to reduce the number of reindexing threads to reduce the load on the JVM.You can exclude proejcts when reindexing all changes, see gerrit.config option index.excludeProjectFromChangeReindex
You can then separately index the excluded project using the gerrit index changes-in-project command,
On 19 Apr 2024, at 15:44, Hakan AVCI <hakana...@gmail.com> wrote:On Friday 19 April 2024 at 16:27:05 UTC+2 Luca Milanesio wrote:On 19 Apr 2024, at 15:09, Daniele Sassoli <daniele...@gmail.com> wrote:On Friday 19 April 2024 at 14:54:48 UTC+1 Hakan AVCI wrote:Hello Everyone,I have been trying to upgrade our Gerrit instance from 3.5.2 to 3.8.3 on our staging instance with whole data replicated from Prod instance to mimic production upgrade. Everything is fine except only one issue which is reindex is not getting completed due to one of the repositories that I found after many reindex tries :)Workaround was for me to move this bare repo out of the git folder that is inside of the Gerrit home_folder (original location) to somewhere else, then offline reindex that followed by init process, was successful. I had to do this because otherwise Gerrit would never start due to incomplete index. But for sure, I have to make all changes of this repo are visible in UI anyway. However, online reindex also act like offline so it's getting stuck somewhere while it's trying to index changes for that problematic repo I have mentioned. Result was the same when I delete whole index folder and run reindex to let Gerrit creates indexes from scratch. I also ran git gc in aggressive mode (takes around 2 hours to complete) but this did not help either. This repo, unfortunately, contains lots of binaries and its current size is around 14G.My question is how can I get more info about reindex process ( --verbose in offline reindex did not really help to figure this out ), what is it doing and how can I see which exact change is causing this issue?Running git fsck on the repo might be a good first step.
Also keep in mind that when updating from 3.5 to 3.8 you will first need to upgrade to 3.6 to run the copy-approvals command.Good point, how did you perform the upgrade?If you check my presentation of Gerrit v3.8 at the last Gerrit User Summit (10:09) on the GerritForge’s TV channel, you’ll see that it says:- Upgrade to v3.5- Run copy-approval- Upgrade to v3.8Did you run the copy-approval tool?Yes I did, that was first thing I have done on prod instance, then I have copied everything to staging. I was following https://groups.google.com/g/repo-discuss/c/HlW4WhKcUp4 thread.I actually saw a comment about copy-approval from you here in thread: https://groups.google.com/g/repo-discuss/c/S8shRzWnFrQ, which as I understand copy-approval should not impact any upgrade process. Or did I interpret this wrong?
Luca.Thanks in advance!Hakan.--
--
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/2f7d8cb0-8994-4cde-8dbb-71ac42bf0499n%40googlegroups.com.--
--
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/576d1ab1-4513-4ce4-b25d-e92e6ba0ffcen%40googlegroups.com.
On 19 Apr 2024, at 15:44, Hakan AVCI <hakana...@gmail.com> wrote:On Friday 19 April 2024 at 16:27:05 UTC+2 Luca Milanesio wrote:On 19 Apr 2024, at 15:09, Daniele Sassoli <daniele...@gmail.com> wrote:On Friday 19 April 2024 at 14:54:48 UTC+1 Hakan AVCI wrote:Hello Everyone,I have been trying to upgrade our Gerrit instance from 3.5.2 to 3.8.3 on our staging instance with whole data replicated from Prod instance to mimic production upgrade. Everything is fine except only one issue which is reindex is not getting completed due to one of the repositories that I found after many reindex tries :)Workaround was for me to move this bare repo out of the git folder that is inside of the Gerrit home_folder (original location) to somewhere else, then offline reindex that followed by init process, was successful. I had to do this because otherwise Gerrit would never start due to incomplete index. But for sure, I have to make all changes of this repo are visible in UI anyway. However, online reindex also act like offline so it's getting stuck somewhere while it's trying to index changes for that problematic repo I have mentioned. Result was the same when I delete whole index folder and run reindex to let Gerrit creates indexes from scratch. I also ran git gc in aggressive mode (takes around 2 hours to complete) but this did not help either. This repo, unfortunately, contains lots of binaries and its current size is around 14G.My question is how can I get more info about reindex process ( --verbose in offline reindex did not really help to figure this out ), what is it doing and how can I see which exact change is causing this issue?Running git fsck on the repo might be a good first step.
Also keep in mind that when updating from 3.5 to 3.8 you will first need to upgrade to 3.6 to run the copy-approvals command.Good point, how did you perform the upgrade?If you check my presentation of Gerrit v3.8 at the last Gerrit User Summit (10:09) on the GerritForge’s TV channel, you’ll see that it says:- Upgrade to v3.5- Run copy-approval- Upgrade to v3.8Did you run the copy-approval tool?Yes I did, that was first thing I have done on prod instance, then I have copied everything to staging. I was following https://groups.google.com/g/repo-discuss/c/HlW4WhKcUp4 thread.I actually saw a comment about copy-approval from you here in thread: https://groups.google.com/g/repo-discuss/c/S8shRzWnFrQ, which as I understand copy-approval should not impact any upgrade process. Or did I interpret this wrong?Well, I did not find that remark in the thread :-)
Please use the video and the release notes as a reference: individual sentences in a long discussion thread cannot be taken out of context. The copy-approval is mandatory and must be part of your upgrade process.
On 19 Apr 2024, at 15:52, Hakan AVCI <hakana...@gmail.com> wrote:On Friday 19 April 2024 at 16:30:45 UTC+2 Matthias Sohn wrote:On Fri, Apr 19, 2024 at 3:54 PM Hakan AVCI <hakana...@gmail.com> wrote:Hello Everyone,I have been trying to upgrade our Gerrit instance from 3.5.2 to 3.8.3 on our staging instance with whole data replicated from Prod instance to mimic production upgrade. Everything is fine except only one issue which is reindex is not getting completed due to one of the repositories that I found after many reindex tries :)Workaround was for me to move this bare repo out of the git folder that is inside of the Gerrit home_folder (original location) to somewhere else, then offline reindex that followed by init process, was successful. I had to do this because otherwise Gerrit would never start due to incomplete index. But for sure, I have to make all changes of this repo are visible in UI anyway. However, online reindex also act like offline so it's getting stuck somewhere while it's trying to index changes for that problematic repo I have mentioned. Result was the same when I delete whole index folder and run reindex to let Gerrit creates indexes from scratch. I also ran git gc in aggressive mode (takes around 2 hours to complete) but this did not help either. This repo, unfortunately, contains lots of binaries and its current size is around 14G.My question is how can I get more info about reindex process ( --verbose in offline reindex did not really help to figure this out ), what is it doing and how can I see which exact change is causing this issue?Did you provide enough heap and CPUs to the reindexing ?I think so, 16 CPU and 24G memory and since it's a dedicated staging instance there was no other load at all.
Did you observe Java gc activity during reindexing ?If you meant taking a heap dump during the reindex and look inside, then my answer is no.
On a huge repo with limited heap and CPUs you could overload the JVM so that it's mostly busy running Java gc.
On large repos you may need to reduce the number of reindexing threads to reduce the load on the JVM.You can exclude proejcts when reindexing all changes, see gerrit.config option index.excludeProjectFromChangeReindexBut then this will lead that no change is visible in UI for that repository, right?
You can then separately index the excluded project using the gerrit index changes-in-project command,Yes, I also tried that, same result. I even let it run for 4-5 days but there was no new change has indexed (I was checking UI to see if some new changes are visible).
see https://gerrit-review.googlesource.com/Documentation/cmd-index-changes-in-project.html.
In between you can also change the indexing configuration to e.g. use less threads on the huge repo.-MatthiasThanks in advance!Hakan.--
--
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/da7d8fff-c030-4326-ba01-b6db4ae62032n%40googlegroups.com.
--
--
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/3d0fc94d-212f-4f99-96dc-6ee36633f99an%40googlegroups.com.
On 19 Apr 2024, at 15:52, Hakan AVCI <hakana...@gmail.com> wrote:On Friday 19 April 2024 at 16:30:45 UTC+2 Matthias Sohn wrote:On Fri, Apr 19, 2024 at 3:54 PM Hakan AVCI <hakana...@gmail.com> wrote:Hello Everyone,I have been trying to upgrade our Gerrit instance from 3.5.2 to 3.8.3 on our staging instance with whole data replicated from Prod instance to mimic production upgrade. Everything is fine except only one issue which is reindex is not getting completed due to one of the repositories that I found after many reindex tries :)Workaround was for me to move this bare repo out of the git folder that is inside of the Gerrit home_folder (original location) to somewhere else, then offline reindex that followed by init process, was successful. I had to do this because otherwise Gerrit would never start due to incomplete index. But for sure, I have to make all changes of this repo are visible in UI anyway. However, online reindex also act like offline so it's getting stuck somewhere while it's trying to index changes for that problematic repo I have mentioned. Result was the same when I delete whole index folder and run reindex to let Gerrit creates indexes from scratch. I also ran git gc in aggressive mode (takes around 2 hours to complete) but this did not help either. This repo, unfortunately, contains lots of binaries and its current size is around 14G.My question is how can I get more info about reindex process ( --verbose in offline reindex did not really help to figure this out ), what is it doing and how can I see which exact change is causing this issue?Did you provide enough heap and CPUs to the reindexing ?I think so, 16 CPU and 24G memory and since it's a dedicated staging instance there was no other load at all.Well, the reindex is really putting extra pressure that you typically don’t have. Depending on the size of the repo and the complexity of the submit rules, the reindex may take lots of memory and CPU.Did you observe Java gc activity during reindexing ?If you meant taking a heap dump during the reindex and look inside, then my answer is no.No, you should run it with the verbose GC logging enabled:On a huge repo with limited heap and CPUs you could overload the JVM so that it's mostly busy running Java gc.
On large repos you may need to reduce the number of reindexing threads to reduce the load on the JVM.You can exclude proejcts when reindexing all changes, see gerrit.config option index.excludeProjectFromChangeReindexBut then this will lead that no change is visible in UI for that repository, right?Sure, but you can reindex that later on, as Matthias suggested, with the command 'gerrit index changes-in-project’You can then separately index the excluded project using the gerrit index changes-in-project command,Yes, I also tried that, same result. I even let it run for 4-5 days but there was no new change has indexed (I was checking UI to see if some new changes are visible).You should get a thread dump and see if there is any activity stuck, also check the error_log for errors.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/89411b83-8d73-4771-b35c-1f7bd4dc2209n%40googlegroups.com.
Ensure that the diff caches in gerrit are persistent and large enough.
On 30 Apr 2024, at 08:57, Hakan AVCI <hakana...@gmail.com> wrote:I would like to update/summarize this thread for the people who might get benefit from it.In my case, 7 hours~ after running "gerrit gc --show-progress --aggressive repo_name", it did the trick and reindex went well. Running "git gc" on the server for this bare repo did not help like I mentioned before, so I guess jgit might be doing some magic.
But please make sure about --aggressive mode before use it, like reading what is it doing and even maybe taking a backup of the repo.
Another note from my operation, there were some issues for some repos (unfortunately I dont have exact error messages anymore) to complete copy-approval process in version 3.5.2. So, first I upgraded the instance to 3.5.6 (issues that I faced in 3.5.2 was fixed in 3.5.6) then ran copy-approval %100 successfully and then I switched to 3.8.5 (we have decided to go for latest minor version of 3.8). Maybe copy-approval issues in 3.5.2 has been mentioned in some other threads but I guess worth to mention here as well.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/d15963bd-0986-44c4-b078-98e4a2edb2c8n%40googlegroups.com.