Exclude WIP or Starred Changes from Auto-Abandon?

48 views
Skip to first unread message

Yingchun Li

unread,
Feb 5, 2026, 3:01:28 AM (3 days ago) Feb 5
to Repo and Gerrit Discussion
Hi,
Currently, the auto-abandon feature closes all open changes—even those marked as WIP or starred, which may still be actively maintained.
There's an exemption for mergeable changes, but it's not always practical (e.g., a topic branch is pushed and changes pushed to this branch but never submitted).
Could Gerrit add an option to exempt WIP or starred changes from auto-abandon? This would help preserve changes the owner intends to keep.
Thanks!
 Br,
Yingchun

Daniele Sassoli

unread,
Feb 5, 2026, 7:08:56 AM (3 days ago) Feb 5
to Repo and Gerrit Discussion
Sounds like maybe your auto-abandon has too short of a timeframe?
If changes are still in WIP after like 3 months? 6 months is there really much point in keeping them round? I guess the answer is subjective to your setup and use cases.
But I feel like adding and exception for WIP or starred is kind of working against the feature itself.

One could forget a change is in WIP or starred and then it would never be abandoned.
 
Thanks!
 Br,
Yingchun

Sven Selberg

unread,
Feb 5, 2026, 7:24:24 AM (3 days ago) Feb 5
to Repo and Gerrit Discussion
On Thursday, February 5, 2026 at 1:08:56 PM UTC+1 Daniele Sassoli wrote:
On Thursday, 5 February 2026 at 08:01:28 UTC sword.l...@gmail.com wrote:
Hi,
Currently, the auto-abandon feature closes all open changes—even those marked as WIP or starred, which may still be actively maintained.
There's an exemption for mergeable changes, but it's not always practical (e.g., a topic branch is pushed and changes pushed to this branch but never submitted).
Could Gerrit add an option to exempt WIP or starred changes from auto-abandon? This would help preserve changes the owner intends to keep.

Sounds like maybe your auto-abandon has too short of a timeframe?
If changes are still in WIP after like 3 months? 6 months is there really much point in keeping them round? I guess the answer is subjective to your setup and use cases.
But I feel like adding and exception for WIP or starred is kind of working against the feature itself.

What Daniele said.
Abandoned changes can easily be activated again if someone wants to start working with them again, and I don't see that WIP and starred changes should be an exception generally.

Yingchun Li

unread,
Feb 5, 2026, 7:57:36 AM (3 days ago) Feb 5
to Repo and Gerrit Discussion
Some users simply push code they believe is useful but have no intention of formally submitting it for review.
As a result, there are now so many abandoned changes that I'd like to delete them periodically.
However, I still want to give users a chance to preserve any open changes they genuinely intend to maintain
en, maybe I should use a scripts to clean these changs.

Sven Selberg

unread,
Feb 5, 2026, 10:47:31 AM (3 days ago) Feb 5
to Repo and Gerrit Discussion
On Thursday, February 5, 2026 at 1:57:36 PM UTC+1 Yingchun Li wrote:
On Thursday, February 5, 2026 at 8:24:24 PM UTC+8 Sven Selberg wrote:
On Thursday, February 5, 2026 at 1:08:56 PM UTC+1 Daniele Sassoli wrote:
On Thursday, 5 February 2026 at 08:01:28 UTC sword.l...@gmail.com wrote:
Hi,
Currently, the auto-abandon feature closes all open changes—even those marked as WIP or starred, which may still be actively maintained.
There's an exemption for mergeable changes, but it's not always practical (e.g., a topic branch is pushed and changes pushed to this branch but never submitted).
Could Gerrit add an option to exempt WIP or starred changes from auto-abandon? This would help preserve changes the owner intends to keep.

Sounds like maybe your auto-abandon has too short of a timeframe?
If changes are still in WIP after like 3 months? 6 months is there really much point in keeping them round? I guess the answer is subjective to your setup and use cases.
But I feel like adding and exception for WIP or starred is kind of working against the feature itself.

What Daniele said.
Abandoned changes can easily be activated again if someone wants to start working with them again, and I don't see that WIP and starred changes should be an exception generally.
Some users simply push code they believe is useful but have no intention of formally submitting it for review.
As a result, there are now so many abandoned changes that I'd like to delete them periodically.

How many abandoned changes are we talking about?
We don't bother with abandoned changes, they generally don't/shouldn't affect performance.

Yingchun Li

unread,
Feb 6, 2026, 12:51:59 AM (2 days ago) Feb 6
to Repo and Gerrit Discussion
On Thursday, February 5, 2026 at 11:47:31 PM UTC+8 Sven Selberg wrote:
On Thursday, February 5, 2026 at 1:57:36 PM UTC+1 Yingchun Li wrote:
On Thursday, February 5, 2026 at 8:24:24 PM UTC+8 Sven Selberg wrote:
On Thursday, February 5, 2026 at 1:08:56 PM UTC+1 Daniele Sassoli wrote:
On Thursday, 5 February 2026 at 08:01:28 UTC sword.l...@gmail.com wrote:
Hi,
Currently, the auto-abandon feature closes all open changes—even those marked as WIP or starred, which may still be actively maintained.
There's an exemption for mergeable changes, but it's not always practical (e.g., a topic branch is pushed and changes pushed to this branch but never submitted).
Could Gerrit add an option to exempt WIP or starred changes from auto-abandon? This would help preserve changes the owner intends to keep.

Sounds like maybe your auto-abandon has too short of a timeframe?
If changes are still in WIP after like 3 months? 6 months is there really much point in keeping them round? I guess the answer is subjective to your setup and use cases.
But I feel like adding and exception for WIP or starred is kind of working against the feature itself.

What Daniele said.
Abandoned changes can easily be activated again if someone wants to start working with them again, and I don't see that WIP and starred changes should be an exception generally.
Some users simply push code they believe is useful but have no intention of formally submitting it for review.
As a result, there are now so many abandoned changes that I'd like to delete them periodically.

How many abandoned changes are we talking about?
ssh -p 29418 localhost gerrit query --no-limit -- "project:project_a status:open" | grep url | wc -l
13458 
ssh -p 29418 localhost gerrit query --no-limit -- "project:project_a status:abandon" | grep url | wc -l
9440
Here the most of open-changes are stale,  and some even several years. 
We don't bother with abandoned changes, they generally don't/shouldn't affect performance.
From the server log, there are plenty of warning:
INFO  com.google.gerrit.server.permissions.DefaultRefFilter : Performing visibility check for all refs. This can be expensive. [CONTEXT ratelimit_period="1 SECONDS" skipped=13 TRACE_ID="1770357151550-b9409074" project="foo" request="GIT_UPLOAD" ]

Don't know if the abandoned changes will be counted for permissions check.

Sven Selberg

unread,
Feb 6, 2026, 1:55:49 AM (2 days ago) Feb 6
to Repo and Gerrit Discussion
On Friday, February 6, 2026 at 6:51:59 AM UTC+1 Yingchun Li wrote:
On Thursday, February 5, 2026 at 11:47:31 PM UTC+8 Sven Selberg wrote:
On Thursday, February 5, 2026 at 1:57:36 PM UTC+1 Yingchun Li wrote:
On Thursday, February 5, 2026 at 8:24:24 PM UTC+8 Sven Selberg wrote:
On Thursday, February 5, 2026 at 1:08:56 PM UTC+1 Daniele Sassoli wrote:
On Thursday, 5 February 2026 at 08:01:28 UTC sword.l...@gmail.com wrote:
Hi,
Currently, the auto-abandon feature closes all open changes—even those marked as WIP or starred, which may still be actively maintained.
There's an exemption for mergeable changes, but it's not always practical (e.g., a topic branch is pushed and changes pushed to this branch but never submitted).
Could Gerrit add an option to exempt WIP or starred changes from auto-abandon? This would help preserve changes the owner intends to keep.

Sounds like maybe your auto-abandon has too short of a timeframe?
If changes are still in WIP after like 3 months? 6 months is there really much point in keeping them round? I guess the answer is subjective to your setup and use cases.
But I feel like adding and exception for WIP or starred is kind of working against the feature itself.

What Daniele said.
Abandoned changes can easily be activated again if someone wants to start working with them again, and I don't see that WIP and starred changes should be an exception generally.
Some users simply push code they believe is useful but have no intention of formally submitting it for review.
As a result, there are now so many abandoned changes that I'd like to delete them periodically.

How many abandoned changes are we talking about?
ssh -p 29418 localhost gerrit query --no-limit -- "project:project_a status:open" | grep url | wc -l
13458 
ssh -p 29418 localhost gerrit query --no-limit -- "project:project_a status:abandon" | grep url | wc -l
9440

That is a lot of stale changes (depending on how active the project is off course).

Personally I wouldn't be worried about it causing noticeable performance issues from ~20.000 abandoned changes. I believe stale open changes do cause unnecessary performance issues. (someone could correct me)

Here are the numbers for one of our most active gits, ~800 new changes per week (we have been auto-abandoning changes older than 2 months for years):

$ ssh gtg gerrit query --no-limit -- "project:active/git status:open" | grep url | uniq | wc -l
700
$ ssh gtg gerrit query --no-limit -- "project:active/git status:abandon" | grep url | uniq | wc -l
25636

Matthias Sohn

unread,
Feb 6, 2026, 3:38:19 AM (2 days ago) Feb 6
to Sven Selberg, Repo and Gerrit Discussion
one of our gerrit servers has 17k open and 971k abandoned changes.
I recommend using auto-abandon to archive stale open changes to ensure good performance.
If any of those abandoned changes is needed later it can be easily restored by the end users.
 
Here the most of open-changes are stale,  and some even several years. 
We don't bother with abandoned changes, they generally don't/shouldn't affect performance.
From the server log, there are plenty of warning:
INFO  com.google.gerrit.server.permissions.DefaultRefFilter : Performing visibility check for all refs. This can be expensive. [CONTEXT ratelimit_period="1 SECONDS" skipped=13 TRACE_ID="1770357151550-b9409074" project="foo" request="GIT_UPLOAD" ]

Don't know if the abandoned changes will be counted for permissions check.
 

However, I still want to give users a chance to preserve any open changes they genuinely intend to maintain
en, maybe I should use a scripts to clean these changs.

One could forget a change is in WIP or starred and then it would never be abandoned.
 
Thanks!
 Br,
Yingchun

--
--
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/c0289d6d-13af-46f0-9b65-1a1c11b4d087n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages