You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the Infomer.watch method that yields notices from the watch endpoint is not guaranteed to receive all events in case the informer restarts the watcher:
Informer fills/replaces cache from get request and stores the resource version
Informer starts watch request with the resource version from the get
Some changes happen in Kubernetes cluster before the next get request (those will not be yielded to the watch block)
Repeat 1: the get will receive the state with the changes happened in 4 and update list
Repeat 2: but the watch now will start after those changes, so watch will not be yielded with the changes happened in 4.
Potential solutions:
Document the behaviour of that watch interface can miss changes (and that list is the only source of truth)
Only request get once when informer.start_worker is called, when watch request stops, only restart the watch with the latest seen resource version
The text was updated successfully, but these errors were encountered:
DocX
changed the title
Informer.watch is not guaranteed to receive all changes
Informer.watch is not guaranteed to receive all changes during restart
Jan 5, 2023
Using the
Infomer.watch
method that yields notices from thewatch
endpoint is not guaranteed to receive all events in case the informer restarts the watcher:get
request and stores the resource versionwatch
request with the resource version from the getwatch
block)watch
will not be yielded with the changes happened in 4.Potential solutions:
watch
interface can miss changes (and thatlist
is the only source of truth)get
once wheninformer.start_worker
is called, when watch request stops, only restart the watch with the latest seen resource versionThe text was updated successfully, but these errors were encountered: