-
Notifications
You must be signed in to change notification settings - Fork 686
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/kates: batch raw updates for a certain interval before sending ch…
…anges The Accumulator struct attempts to coalece changes into a single snapshot update as a way to do graceful load shedding. However, while this was the behavior on bootstrap, it didn't always happen mid-watch - each event that was received turned into a single snapshot update, thus not really satisfying this requirement. We add a new option to batch changes for a specified interval before sending a snapshot update. This allows a way to configure how aggressive load shedding can take place. The default interval is set at 0 to keep the current previous behavior. A snapshot update won't be sent until all resources are fully bootstrapped, regardless of what interval is set. This is the ensure that the other requirements for the Accumulator are still satisfied. For testing, we add a new test case TestBatchNoNotifyBeforeSync. Signed-off-by: Hamzah Qudsi <[email protected]>
- Loading branch information
Hamzah Qudsi
committed
Sep 8, 2022
1 parent
f810b88
commit 5271ca9
Showing
3 changed files
with
157 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters