Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resync cache logic upon watcher reset #305

Merged
merged 1 commit into from
Sep 6, 2023
Merged

Add resync cache logic upon watcher reset #305

merged 1 commit into from
Sep 6, 2023

Conversation

reachjainrahul
Copy link
Contributor

Fixes a race condition which in watcher is trying to re-connect and ANP is deleted by the user. In this case, when the watcher re-connect, it will not receive delete event for those objects and those objects will remain in network policy controller cache and in cloud too.

Here, we introduce a resync logic in which, upon any re-connect, the cache will be resynced first and then new cache will be compared with in-memory cache to figure out stale objects and explicitly delete them.

Fixes a race condition which in watcher is trying to re-connect and
ANP is deleted by the user. In this case, when the watcher re-connect,
it will not receive delete event for those objects and those objects
will remain in network policy controller cache and in cloud too.

Here, we introduce a resync logic in which, upon any re-connect, the
cache will be resynced first and then new cache will be compared with
in-memory cache to figure out stale objects and explicitly delete them.

Signed-off-by: Rahul Jain <[email protected]>
@reachjainrahul
Copy link
Contributor Author

/nephe-test-e2e-agentless

1 similar comment
@reachjainrahul
Copy link
Contributor Author

/nephe-test-e2e-agentless

@reachjainrahul
Copy link
Contributor Author

/nephe-test-e2e-aks

@reachjainrahul reachjainrahul added this to the Nephe v0.7.0 release milestone Sep 5, 2023
@reachjainrahul reachjainrahul merged commit 2e45df4 into main Sep 6, 2023
12 checks passed
@reachjainrahul reachjainrahul deleted the resync branch September 6, 2023 17:51
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.

2 participants