mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-22 15:09:39 +00:00
Improve GC discovery sync performance
Improve GC discovery sync performance by only syncing when discovered resource diffs are detected. Before, the GC worker pool was shut down and monitors resynced unconditionally every sync period, leading to significant processing delays causing test flakes where otherwise reasonable GC timeouts were being exceeded. Related to https://github.com/kubernetes/kubernetes/issues/49966.
This commit is contained in:
@@ -265,7 +265,7 @@ func setup(t *testing.T, workerCount int) *testContext {
|
||||
syncPeriod := 5 * time.Second
|
||||
startGC := func(workers int) {
|
||||
go gc.Run(workers, stopCh)
|
||||
go gc.Sync(restMapper, discoveryClient, syncPeriod, stopCh)
|
||||
go gc.Sync(clientSet.Discovery(), syncPeriod, stopCh)
|
||||
}
|
||||
|
||||
if workerCount > 0 {
|
||||
|
Reference in New Issue
Block a user