Skip to content

Conversation

@slinkydeveloper
Copy link
Contributor

Fix #580

+ "If you need to customize the thread pool used by your restate handlers, "
+ "use HandlerRunner.Options.withExecutor() with Endpoint.bind()");

return Executors.newCachedThreadPool();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm torn on this one. On one hand, we should use a bounded executor as described here #580 (comment)

On the other hand, i'm worried that this is gonna cause some breaking changes wrt to Java < 21 users: an undersized queue will certainly cause a flood of failing invocations for some existing users, because of this artificial bound we would introduce here.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2026

Test Results

  7 files  ±0    7 suites  ±0   4m 53s ⏱️ -1s
 49 tests ±0   49 ✅ ±0  0 💤 ±0  0 ❌ ±0 
210 runs  ±0  210 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 83d4909. ± Comparison against base commit d48e074.

♻️ This comment has been updated with latest results.

@slinkydeveloper slinkydeveloper merged commit 11dff33 into main Jan 27, 2026
8 checks passed
@slinkydeveloper slinkydeveloper deleted the issues/580 branch January 27, 2026 16:00
@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve resource exhaustion handling

2 participants