Skip to content

[CASSANDRA-21166] Avoid creating of thousands of threads by MatcherResponse when many messages are handled using MockMessagingSpy#4624

Closed
netudima wants to merge 1 commit intoapache:trunkfrom
netudima:CASSANDRA-21166-trunk
Closed

[CASSANDRA-21166] Avoid creating of thousands of threads by MatcherResponse when many messages are handled using MockMessagingSpy#4624
netudima wants to merge 1 commit intoapache:trunkfrom
netudima:CASSANDRA-21166-trunk

Conversation

@netudima
Copy link
Copy Markdown
Contributor

Avoid creating of thousands of threads by MatcherResponse when many messages are handled using MockMessagingSpy

Too many threads can lead to OOM, so new Thread is replaced with an executor; spinUntilTrue is added to HintsServiceTest.testPageSeek to avoid NPE (HintsStore is populated in an async way)

patch by Dmitry Konstantinov; reviewed by TBD for CASSANDRA-21166

Copy link
Copy Markdown
Contributor

@driftx driftx left a comment

Choose a reason for hiding this comment

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

Mostly looks good, left some comments around using an ExecutorService.

…when many messages are handled using MockMessagingSpy

Too many threads can lead to OOM, so new Thread is replaced ith an executor
spin wait is added to HintsServiceTest.testPageSeek to avoid NPE (HintsStore is populated in an async way)

patch by Dmitry Konstantinov; reviewed by Brandon Williams for CASSANDRA-21166
@netudima netudima force-pushed the CASSANDRA-21166-trunk branch from 2587b47 to 25e2258 Compare February 18, 2026 22:32
@netudima netudima closed this Feb 18, 2026
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