[Bug] Remove unused data from persistedGVKs #1358
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
I am not sure whether my understanding is correct. Please correct me if I am wrong.
Both
apiv1.Namespace
andapiv1.Service
are stored inpersistedGVKs
. However, setting eitherstore
[1] orpredicate
[2] tonil
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 eitherstore
(i.e.persistedGVKs
) orpredicate
(i.e.stateChangedPredicates
). Therefore, store and predicate should be either both set or both unset.[1]
store: nil
implies that a state change will not trigger a graph rebuild.nginx-gateway-fabric/internal/mode/static/state/store.go
Lines 185 to 187 in 3d38822
[2]
predicate: nil
implies that a state change will not trigger a graph rebuild.nginx-gateway-fabric/internal/mode/static/state/store.go
Lines 193 to 196 in 3d38822
This PR sets
store: nil
for bothapiv1.Namespace
andapiv1.Service
to make both store and predicate to be nil.Checklist
Before creating a PR, run through this checklist and mark each as complete.