Skip to content

node: Skip equal objects in LocalNodeStore.Update() (1.18.3)#32

Open
jiashengz wants to merge 1 commit into
base/v1.18.3from
test/localnode-dedup-v1.18-clean
Open

node: Skip equal objects in LocalNodeStore.Update() (1.18.3)#32
jiashengz wants to merge 1 commit into
base/v1.18.3from
test/localnode-dedup-v1.18-clean

Conversation

@jiashengz

Copy link
Copy Markdown

Summary

Backport of the LocalNodeStore.Update() dedup behavior, based directly on the 1.18.2 release tag (via the base/v1.18.2 base branch) so the diff is the single relevant change.

Don't emit (and wake up observers) when a mutator produces no change to the local node. This prevents redundant downstream work -- most importantly the nodediscovery CiliumNode resource writes that are triggered on every local node emission. During a Kubernetes apiserver outage those writes fail and the retry path ends in logging.Fatal, crashing the agent. Skipping no-op updates keeps the agent from re-arming that fatal path when nothing actually changed.

This is a backport of the dedup behavior from upstream's StateDB-based LocalNodeStore, adapted to the 1.18 stream-based store.

Upstream-reference: cilium#41294

Changes

  • pkg/node/local_node_store.go: skip emit when the mutator produces no change (DeepEqual).

Test plan

  • Verify no-op Update() calls do not wake observers / trigger CiliumNode writes
  • Verify real changes still propagate to observers

Made with Cursor

Don't emit (and wake up observers) when a mutator produces no change to the
local node. This prevents redundant downstream work -- most importantly the
nodediscovery CiliumNode resource writes that are triggered on every local
node emission. During a Kubernetes apiserver outage those writes fail and the
retry path ends in logging.Fatal, crashing the agent. Skipping no-op updates
keeps the agent from re-arming that fatal path when nothing actually changed.

This is a backport of the dedup behavior from upstream's StateDB-based
LocalNodeStore, adapted to the 1.18 stream-based store.

Upstream-reference: cilium#41294
Signed-off-by: Jiasheng Zhu <jiashengzhu@roblox.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 397a641)
@jiashengz jiashengz force-pushed the test/localnode-dedup-v1.18-clean branch from d26aff3 to 4d1a23f Compare June 16, 2026 22:08
@jiashengz jiashengz changed the base branch from base/v1.18.2 to base/v1.18.3 June 16, 2026 22:08
@jiashengz jiashengz changed the title node: Skip equal objects in LocalNodeStore.Update() (1.18.2) node: Skip equal objects in LocalNodeStore.Update() (1.18.3) Jun 16, 2026
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.

1 participant