Commit Graph

12 Commits

Author SHA1 Message Date
Dave McCormick
e9b0103a41 Fix a race where a call to Shutdown was happening after ShutDownWithDrain() had performed the check q.isProcessing() && q.shouldDrain() and before waitForProcessing() has reached its Wait(). This is because waitForProcessing() is only checking the length part of the condition instead of both the length and whether we still need to drain.
It turned out that there were lots of unnecessary accessor functions being called locking and unlocking the cond which are not needed because Wait() automatically unlocks and locks the cond for us and best practice says we should run it in a for checking for the condition (so this is what I have done).

Kubernetes-commit: 2b12df56b0be93bc2cac7c5a66342c0ffaa72311
2023-07-24 22:40:54 +01:00
austin ce
66fa9d308f Unify queue constructors, deprecate current constructors
Kubernetes-commit: fea83b78243c77e81b91f3f0a812979809aeacaf
2023-03-10 17:46:26 -05:00
austin ce
9668243c04 Integrate new metrics provider option in test case
Kubernetes-commit: 9e83e7e975dd5971e60e9768e06520aa5ebf9bf8
2022-12-02 14:08:11 -05:00
austin ce
98d0d1a9ba Allow setting per-queue metrics providers
Kubernetes-commit: da71811514ac6e8fedd265831fed71f897b97781
2022-11-29 20:47:33 -05:00
xuzhonghu
2f21912570 Fix workqueue memory leak
Kubernetes-commit: 25060beef0c536e80b53507ec445695a7305db00
2021-09-14 09:53:53 +08:00
wojtekt
14a51589c3 Migratet to k8s.io/utils/clock in workqueue
Kubernetes-commit: 392292ba81964e6ee7badec360a800b1f8645f2f
2021-09-09 16:38:59 +02:00
Alexander Constantinescu
22aa998def [queue] Implement ShutDownWithDrain allowing the queue to drain when shutting down
Signed-off-by: Alexander Constantinescu <aconstan@redhat.com>

Kubernetes-commit: 5b740f430e0a4892e9db3a1fea9f349a06267755
2021-05-12 02:26:22 +02:00
Dan Ramich
f39ca994bd Don't start goroutine for noMetrics
Problem:
When calling newQueue metrics can be of type noMetrics when just calling
New. When doing this a new goroutine is created to update the metrics
but in this case there are no metrics so it's just creating goroutines
that don't do anything but consume resources.

Solution:
If the incoming metrics is of type noMetrics, don't start the goroutine

Kubernetes-commit: de021396f81ff438899297a6f464c70113b58475
2020-09-15 16:21:48 -06:00
Daniel Smith
26f9385b8e Test workqueue metrics
Kubernetes-commit: 5a8444ceec9e28e8a7dbf36bfd7cb55554c5b865
2018-11-09 16:12:11 -08:00
Daniel Smith
75d4dad922 add a metric that can be used to notice stuck worker threads
Kubernetes-commit: 6195d1005d81eaa5dd49da744f5beab178340f5a
2018-11-09 10:43:44 -08:00
StudyNick
268171e690 'workqueue' modify 'work queue'
Kubernetes-commit: dc460c3e15651d7e3527337c7997ab7f956ad6b1
2017-04-14 20:28:20 +00:00
Kubernetes Publisher
b766ef93a4 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is a2b65f03bf83013d1af05c99b7aa22049ca63de3
2017-01-31 15:19:42 +00:00