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: CacheListener to use thread-safe ListenerSet for managing listeners #2769

Merged

Conversation

solisamicus
Copy link

What this PR does:

  • Replaces the map[registry.MappingListener]struct{} with a thread-safe ListenerSet for managing listeners.
  • Ensures safe concurrent access by using sync.RWMutex in the ListenerSet.

Which issue(s) this PR fixes:

Fixes #2759

Special notes for your reviewer:

  • This refactor improves thread safety but may require additional performance testing to ensure there is no negative impact on listener management.
  • No change in external functionality, this is an internal improvement.

Does this PR introduce a user-facing change?:

NONE

@solisamicus solisamicus changed the base branch from main to develop December 23, 2024 11:36
@AlexStocks AlexStocks merged commit cade298 into apache:develop Dec 24, 2024
6 checks passed
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.

Triple client panic, CacheListener.AddListener
3 participants