Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue manager FlushAll can loop rapidly - add delay #15733

Merged
merged 4 commits into from
May 11, 2021

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented May 5, 2021

Add delay within FlushAll to prevent rapid loop when workers are busy

Related #15542

Signed-off-by: Andrew Thornton art27@cantab.net

Add delay within FlushAll to prevent rapid loop when workers are busy

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.15.0 milestone May 5, 2021
@zeripath
Copy link
Contributor Author

zeripath commented May 5, 2021

Looking at the testing logs we get:

2021/05/05 12:25:39 ...les/queue/manager.go:188:FlushAll() [D] Flushing (flushable) queue: issue_indexer
2021/05/05 12:25:39 ...les/queue/manager.go:177:FlushAll() [D] Found 16 Managed Queues

... repeats add infinitum ...

2021/05/05 12:25:39 ...les/queue/manager.go:188:FlushAll() [D] Flushing (flushable) queue: issue_indexer
2021/05/05 12:25:39 ...les/queue/manager.go:177:FlushAll() [D] Found 16 Managed Queues

This should stop that.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 5, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 7, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #15733 (f5bf43a) into main (c258131) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #15733      +/-   ##
==========================================
- Coverage   43.94%   43.94%   -0.01%     
==========================================
  Files         678      678              
  Lines       81945    81944       -1     
==========================================
- Hits        36013    36008       -5     
- Misses      40061    40064       +3     
- Partials     5871     5872       +1     
Impacted Files Coverage Δ
modules/queue/manager.go 62.85% <50.00%> (+1.49%) ⬆️
services/pull/temp_repo.go 26.59% <0.00%> (-3.20%) ⬇️
services/pull/check.go 26.02% <0.00%> (-2.74%) ⬇️
services/pull/patch.go 54.23% <0.00%> (-1.70%) ⬇️
modules/queue/workerpool.go 51.64% <0.00%> (-1.10%) ⬇️
services/pull/pull.go 43.37% <0.00%> (-0.46%) ⬇️
modules/log/event.go 61.79% <0.00%> (+1.88%) ⬆️
modules/charset/charset.go 75.75% <0.00%> (+4.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c258131...f5bf43a. Read the comment docs.

modules/queue/manager.go Outdated Show resolved Hide resolved
Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath requested a review from lunny May 9, 2021 17:33
@zeripath zeripath mentioned this pull request May 9, 2021
12 tasks
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 11, 2021
@zeripath
Copy link
Contributor Author

Make lgtm work

@zeripath zeripath merged commit aa65a60 into go-gitea:main May 11, 2021
@zeripath zeripath deleted the fix-flushall-loop branch May 11, 2021 23:22
zeripath added a commit to zeripath/gitea that referenced this pull request May 12, 2021
Backport go-gitea#15733

* Queue manager FlushAll can loop rapidly - add delay

Add delay within FlushAll to prevent rapid loop when workers are busy

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per lunny

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the backport/done All backports for this PR have been created label May 12, 2021
zeripath added a commit that referenced this pull request May 12, 2021
Backport #15733

* Queue manager FlushAll can loop rapidly - add delay

Add delay within FlushAll to prevent rapid loop when workers are busy

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per lunny

Signed-off-by: Andrew Thornton <art27@cantab.net>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
* Queue manager FlushAll can loop rapidly - add delay

Add delay within FlushAll to prevent rapid loop when workers are busy

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per lunny

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants