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

Only attempt to flush queue if the underlying worker pool is not finished (#18593) #18620

Merged
merged 6 commits into from
Feb 6, 2022

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Feb 5, 2022

Backport #18593

There is a possible race whereby a worker pool could be cancelled but yet the
underlying queue is not empty. This will lead to flush-all cycling because it
cannot empty the pool.

  • On shutdown of Persistant Channel Queues close datachan and empty

Partial Backport #18415

Although we attempt to empty the datachan in queues - due to
races we are better off just closing the channel and forcibly emptying
it in shutdown.

Fix #18618

Make temporary workers warning debug instead.

Fix #18617

Signed-off-by: Andrew Thornton [email protected]

…shed (go-gitea#18593)

Backport go-gitea#18593

There is a possible race whereby a worker pool could be cancelled but yet the
underlying queue is not empty. This will lead to flush-all cycling because it
cannot empty the pool.

* On shutdown of Persistant Channel Queues close datachan and empty

Partial Backport go-gitea#18415

Although we attempt to empty the datachan in queues - due to
races we are better off just closing the channel and forcibly emptying
it in shutdown.

Fix go-gitea#18618

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added this to the 1.16.1 milestone Feb 5, 2022
@zeripath
Copy link
Contributor Author

zeripath commented Feb 5, 2022

Also fixes #18617

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 5, 2022
modules/queue/manager.go Outdated Show resolved Hide resolved
modules/queue/manager.go Outdated Show resolved Hide resolved
@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 Feb 6, 2022
@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 Feb 6, 2022
@lunny lunny merged commit 36c6630 into go-gitea:release/v1.16 Feb 6, 2022
@zeripath zeripath deleted the backport-18593-v1.16 branch February 6, 2022 08:52
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WorkerPool warnings after upgrade from 1.13 to 1.16-rc1
5 participants