From 01c9dfa5ff898d47dd6b80d8fbedf1738c9f9f93 Mon Sep 17 00:00:00 2001 From: kaihsun Date: Sat, 9 Dec 2023 17:56:29 +0000 Subject: [PATCH] Remove unused data from persistedGVKs Both apiv1.Namespace and apiv1.Service are stored in persistedGVKs. However, setting either store or predicate to nil implies that a state change will not trigger a graph rebuild. In such cases, only Capturer can trigger the graph rebuild, and Capturer does not require information from either store or predicate. Therefore, store and predicate should be either both set or both unset. This PR sets `store: nil` for both apiv1.Namespace and apiv1.Service --- internal/mode/static/state/change_processor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/mode/static/state/change_processor.go b/internal/mode/static/state/change_processor.go index d2ba8eed35..c8c1ede38f 100644 --- a/internal/mode/static/state/change_processor.go +++ b/internal/mode/static/state/change_processor.go @@ -145,12 +145,12 @@ func NewChangeProcessorImpl(cfg ChangeProcessorConfig) *ChangeProcessorImpl { }, { gvk: extractGVK(&apiv1.Namespace{}), - store: newObjectStoreMapAdapter(clusterStore.Namespaces), + store: nil, predicate: nil, }, { gvk: extractGVK(&apiv1.Service{}), - store: newObjectStoreMapAdapter(clusterStore.Services), + store: nil, predicate: nil, }, {