mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
Decrease goroutines
This commit is contained in:
parent
e0002c7e26
commit
7253f708a8
@ -196,9 +196,9 @@ func EtcdMain(tests func() int) {
|
|||||||
checkNumberOfGoroutines := func() (bool, error) {
|
checkNumberOfGoroutines := func() (bool, error) {
|
||||||
// Leave some room for goroutines we can not get rid of
|
// Leave some room for goroutines we can not get rid of
|
||||||
// like k8s.io/klog/v2.(*loggingT).flushDaemon()
|
// like k8s.io/klog/v2.(*loggingT).flushDaemon()
|
||||||
// TODO(#108483): Reduce this number once we address the
|
// TODO(#108483): Figure out if we can reduce this
|
||||||
// couple remaining issues.
|
// further (ideally down to zero).
|
||||||
if dg := runtime.NumGoroutine() - before; dg <= 9 {
|
if dg := runtime.NumGoroutine() - before; dg <= 4 {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
// Allow goroutines to schedule and die off.
|
// Allow goroutines to schedule and die off.
|
||||||
|
Loading…
Reference in New Issue
Block a user