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

Fix bugs in RootSyncSet controller #3651

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

mortent
Copy link
Contributor

@mortent mortent commented Nov 8, 2022

Fixes some issues in the RootSyncSet:

  • Properly remove watchers.
  • Add ObservedGeneration to the RootSyncSet type so it is possible for clients to determine if the statuses are stale.

@mortent mortent requested a review from justinsb November 8, 2022 19:31
Copy link
Contributor

@justinsb justinsb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

w.cancelFunc()
delete(r.watchers, clusterRef)
stoppedWatchers = append(stoppedWatchers, clusterRef)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I think you can delete from a map during iteration, but it does terrify me :-)

Did you mean to keep the delete(r.watchers, clusterRef) line here?

@justinsb
Copy link
Contributor

justinsb commented Nov 8, 2022

(Updated) changes LGTM!

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.

None yet

2 participants