Skip to content

dbus: suppress duplicate SubState subscriber updates - #532

Open
vulragrag-star wants to merge 1 commit into
coreos:mainfrom
vulragrag-star:fix/502-substate-dedup
Open

vulragrag-star wants to merge 1 commit into
coreos:mainfrom
vulragrag-star:fix/502-substate-dedup

Conversation

@vulragrag-star

Copy link
Copy Markdown

Description

SetSubStateSubscriber can flood updateCh with identical repeats (e.g. thousands of "dead" events per second after a unit stops) because every PropertiesChanged path re-emits the current SubState even when it has not changed.

Remember the last emitted SubState per unit and only send an update when it changes.

Fixes

Fixes #502

Signed-off-by

Signed-off-by: Jason Wang vulragrag@gmail.com

SetSubStateSubscriber could flood updateCh with identical repeats
(e.g. thousands of "dead" events/sec after a unit stops) because every
PropertiesChanged path re-emitted the current SubState. Remember the
last emitted SubState per unit and only send when it changes.

Fixes coreos#502

Signed-off-by: Jason Wang <vulragrag@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] SetSubStateSubscriber floods channel with repeated events when unit is in "dead" state

1 participant