Skip to content

Conversation

@jeffxiang
Copy link
Contributor

Race condition occurs when static initialization in this class competes with Reflections discovery of plugin annotations in https://github.com/pinterest/psc/blame/4.0/psc/src/main/java/com/pinterest/psc/consumer/creation/PscConsumerCreatorManager.java#L18 and the producer equivalent. Enclosing the discovery logic in a synchronized block will force the 3 CreatorManager classes to perform reflection discovery serially and avoid clashes.

@jeffxiang jeffxiang requested a review from a team as a code owner January 9, 2026 21:51
@jeffxiang jeffxiang merged commit 292229c into main Jan 10, 2026
2 of 3 checks passed
@jeffxiang jeffxiang deleted the race_bug branch January 10, 2026 00:06
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.

3 participants