Skip to content

Commit

Permalink
Speedup resync loop if number of unsynced watchers doesn't go down
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Siarkowicz <[email protected]>
  • Loading branch information
serathius committed Dec 3, 2024
1 parent 7e00cc2 commit 3231b06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/storage/mvcc/watchable_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (s *watchableStore) syncWatchersLoop() {

delayTicker.Reset(waitDuration)
// more work pending?
if unsyncedWatchers != 0 && lastUnsyncedWatchers > unsyncedWatchers {
if unsyncedWatchers != 0 && lastUnsyncedWatchers >= unsyncedWatchers {
// be fair to other store operations by yielding time taken
delayTicker.Reset(syncDuration)
}
Expand Down

0 comments on commit 3231b06

Please sign in to comment.