Commit Graph

7 Commits

Author SHA1 Message Date
Marek Siarkowicz 2c4a9730b5 Reset timer to zero when no progress notify was sent
Kubernetes-commit: 98e384fcd093d3cff4767ee009f8164b83bd4753
2024-05-24 11:07:01 +02:00
Marek Siarkowicz 6fb09e7027 Use normal Mutex instead of RWMutex
There is no benefit of having RWMutex as we have one reader and multiple
writers. In such cases RWMutex has worse performance than Mutex.

Kubernetes-commit: 544ea424826ef60d703c5f4fb91b2c6a95f303aa
2024-05-24 10:16:48 +02:00
Marek Siarkowicz 9af63b1bc9 Don't signal when lowering number of waiting routines
Signal is not needed as we never need to wake up when the waiting
is lowered, only when increased.

Kubernetes-commit: e6b54149bb42d58301e34872ebbcf2ea4bcfb474
2024-05-24 10:13:52 +02:00
Marek Siarkowicz be4e4c6bdd Use timer instead of ticker in progress requestor
Ticker behaves differently from what we want, we need a stable period
interval, but ticker doesn't provide that. From NewTicker docstring:
```
The ticker will adjust the time interval or drop ticks to make up for slow receivers.
```

Unfortunatelly there is no way to test it as the FakeClock doesn't
follow the real ticker behavior.

Kubernetes-commit: 7c0e9cda461e176959866b9c2d03b00e817e9b76
2024-05-24 10:10:27 +02:00
Marek Siarkowicz e810084a4b Prevent watch cache starvation, by moving its watch to separate RPC and add a SeparateCacheWatchRPC feature flag to disable this behavior
Kubernetes-commit: 31d404b182d2985ce0d3c43f75d80c29a708beda
2024-02-27 11:25:42 +01:00
Marek Siarkowicz 23cd6bbea9 Fix TestConditionalProgressRequester and TestWaitUntilFreshAndListTimeout flakes
Kubernetes-commit: c1decb6763d2abf76d96aee8641ad56a23e0ba52
2023-07-12 13:36:51 +02:00
Marek Siarkowicz cd751eb82e Implement conditionalProgressRequester that allows requesting watch progress notification if watch cache is not fresh
Kubernetes-commit: 98461be8ffa7383152c442414a16adb217e98080
2023-07-10 18:10:49 +02:00