How to Delete Groups in Gerrit System

445 views
Skip to first unread message

张久旺

unread,
Mar 25, 2025, 3:08:02 AM3/25/25
to Repo and Gerrit Discussion
Hi,
I am reaching out to you all for some urgent assistance regarding an issue we are encountering in our Gerrit system.

Due to an oversight in our operational personnel's management of permissions, a massive number of groups (approximately 80,000) were inadvertently created in our Gerrit system. This has led to significant performance degradation. The most noticeable impact is when the change owner tries to add reviewers; it now takes about 5 to 6 seconds to retrieve the reviewer information, and there are instances where the HTTP status code reports a 502 error.

We are currently operating on Gerrit version 3.2.2. We are keen to find out if there is a viable method to delete these groups and restore our system's performance. Any insights, suggestions, or step-by-step guidance on safely removing these unnecessary groups would be immensely appreciated.

Thank you for your attention to this critical matter. We are hopeful for your kind assistance and look forward to your valuable responses.

Warm regards,

Sven Selberg

unread,
Mar 25, 2025, 3:55:34 AM3/25/25
to Repo and Gerrit Discussion
Delete group support was merged into master in November last year and will end up in next release, 3.12 (branch not yet cut).
 

Warm regards,

luca.mi...@gmail.com

unread,
Mar 25, 2025, 4:00:03 AM3/25/25
to Repo and Gerrit Discussion

Sent from my iPhone

On 25 Mar 2025, at 07:08, '张久旺' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:


Hi,
I am reaching out to you all for some urgent assistance regarding an issue we are encountering in our Gerrit system.

Due to an oversight in our operational personnel's management of permissions, a massive number of groups (approximately 80,000) were inadvertently created in our Gerrit system. This has led to significant performance degradation. The most noticeable impact is when the change owner tries to add reviewers; it now takes about 5 to 6 seconds to retrieve the reviewer information, and there are instances where the HTTP status code reports a 502 error.

We are currently operating on Gerrit version 3.2.2. We are keen to find out if there is a viable method to delete these groups and restore our system's performance. Any insights, suggestions, or step-by-step guidance on safely removing these unnecessary groups would be immensely appreciated.

All groups are stored on All-Users.git, you can just locate the commit that created them and revert them in the group-names ref.

After the removal, just run an off line reinforcing of groups, and then Jon done !

HTH

Luca


Thank you for your attention to this critical matter. We are hopeful for your kind assistance and look forward to your valuable responses.

Warm regards,

--
--
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 visit https://groups.google.com/d/msgid/repo-discuss/a3a8fec2-a7bd-4cd0-8911-0785b7ae63f8n%40googlegroups.com.

Matthias Sohn

unread,
Mar 25, 2025, 4:21:53 AM3/25/25
to luca.mi...@gmail.com, Repo and Gerrit Discussion
On Tue, Mar 25, 2025 at 8:59 AM <luca.mi...@gmail.com> wrote:

Sent from my iPhone

On 25 Mar 2025, at 07:08, '张久旺' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:


Hi,
I am reaching out to you all for some urgent assistance regarding an issue we are encountering in our Gerrit system.

Due to an oversight in our operational personnel's management of permissions, a massive number of groups (approximately 80,000) were inadvertently created in our Gerrit system. This has led to significant performance degradation. The most noticeable impact is when the change owner tries to add reviewers; it now takes about 5 to 6 seconds to retrieve the reviewer information, and there are instances where the HTTP status code reports a 502 error.

We are currently operating on Gerrit version 3.2.2. We are keen to find out if there is a viable method to delete these groups and restore our system's performance. Any insights, suggestions, or step-by-step guidance on safely removing these unnecessary groups would be immensely appreciated.

All groups are stored on All-Users.git, you can just locate the commit that created them and revert them in the group-names ref.

After the removal, just run an off line reinforcing of groups, and then Jon done !

I guess Luca meant reindexing of groups, see https://gerrit-review.googlesource.com/Documentation/pgm-reindex.html
 

HTH

Luca


Thank you for your attention to this critical matter. We are hopeful for your kind assistance and look forward to your valuable responses.

Warm regards,

--
--
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 visit https://groups.google.com/d/msgid/repo-discuss/a3a8fec2-a7bd-4cd0-8911-0785b7ae63f8n%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.

Luca Milanesio

unread,
Mar 25, 2025, 4:50:43 AM3/25/25
to Repo and Gerrit Discussion, Luca Milanesio

On 25 Mar 2025, at 08:21, Matthias Sohn <matthi...@gmail.com> wrote:

On Tue, Mar 25, 2025 at 8:59 AM <luca.mi...@gmail.com> wrote:

Sent from my iPhone

On 25 Mar 2025, at 07:08, '张久旺' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:


Hi,
I am reaching out to you all for some urgent assistance regarding an issue we are encountering in our Gerrit system.

Due to an oversight in our operational personnel's management of permissions, a massive number of groups (approximately 80,000) were inadvertently created in our Gerrit system. This has led to significant performance degradation. The most noticeable impact is when the change owner tries to add reviewers; it now takes about 5 to 6 seconds to retrieve the reviewer information, and there are instances where the HTTP status code reports a 502 error.

We are currently operating on Gerrit version 3.2.2. We are keen to find out if there is a viable method to delete these groups and restore our system's performance. Any insights, suggestions, or step-by-step guidance on safely removing these unnecessary groups would be immensely appreciated.

All groups are stored on All-Users.git, you can just locate the commit that created them and revert them in the group-names ref.

After the removal, just run an off line reinforcing of groups, and then Jon done !

I guess Luca meant reindexing of groups, see https://gerrit-review.googlesource.com/Documentation/pgm-reindex.html

Yes, indeed. Apologies I was on my phone and without glasses :-)

Luca.

jiuwang zhang

unread,
Mar 25, 2025, 6:02:28 AM3/25/25
to Repo and Gerrit Discussion

Hi, Sven,

Thanks for your prompt response. Your insights have been incredibly valuable to us.

We have been developing a series of plugins for version 3.2.2, and upgrading the version at this stage might entail a significant amount of additional work. Therefore, we are considering revising the current version based on the changes you suggested. This approach seems more feasible for us at the moment.

Thank you once again for your assistance. I wish you all the best in your endeavors and a joyful life.

Best regards
Message has been deleted

Luca Milanesio

unread,
Mar 25, 2025, 7:37:40 AM3/25/25
to Repo and Gerrit Discussion, Luca Milanesio


On 25 Mar 2025, at 11:15, 'jiuwang zhang' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:

Hi Luca,
Thank you for your prompt response. 

Your suggestion seems to be a good solution to our current predicament. However, I am not very familiar with the All-users.git repository. The challenge I am facing is how to locate the commit that created the group and then revert it. It appears that using the git log command only shows the commit logs for refs/meta/config.

Just list the refs of the All-Users.git repository (git show-ref) and you’ll notice a ref name that looks like the name of the groups:

$ git show-ref
352b1e40dd4786538c492a970bc96b5e22e25249 refs/meta/group-names

Then perform a ‘git log -p’ of refs/meta/group-names and locate the commits to revert

Lastly, checkout the repo, revert the commits and push them back.

HTH

Luca.


Could you please provide some guidance on how to identify and revert the specific commit related to group creation in this repository?

Thank you once again for your help.

Best regards

Jiuwang Zhang

unread,
Mar 25, 2025, 7:55:25 AM3/25/25
to Repo and Gerrit Discussion
Hi, luca

Thank you so much for your detailed and helpful instructions. I followed your guidance and was able to locate the relevant commit in the All-users.git repository. Your step-by-step explanation made the process much clearer, and I successfully reverted the commit as needed.

Best regards

Matthias Sohn

unread,
Mar 25, 2025, 8:58:00 AM3/25/25
to Jiuwang Zhang, Repo and Gerrit Discussion
On Tue, Mar 25, 2025 at 12:55 PM 'Jiuwang Zhang' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Hi, luca

Thank you so much for your detailed and helpful instructions. I followed your guidance and was able to locate the relevant commit in the All-users.git repository. Your step-by-step explanation made the process much clearer, and I successfully reverted the commit as needed.

This command executed on the All-Users repo should help to find the change(s) which added the users you want to get rid off:

$ git log -p refs/meta/group-names
 
Please note that we prefer interleaved posting instead of top-posting on this mailing list.

Reply all
Reply to author
Forward
0 new messages