-
Notifications
You must be signed in to change notification settings - Fork 10
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: use sendThreadPool in sendEvents #107
fix: use sendThreadPool in sendEvents #107
Conversation
8191770
to
dd71826
Compare
dd71826
to
9069886
Compare
a081734
to
5b45326
Compare
@kevink-sq - It looks like one of the tests is failing with this change. Since we are using the same thread pool for both sending with retry and sending the actual events, the task to send with retry uses up a few threads on the pool and then chokes the actual sending tasks? This problem goes away when you use two different thread pools for send with retry and actual sending or if you replace the executor service with a fork join pool. |
@izaaz - Updated the PR to run |
@izaaz bump |
@izaaz gentle bump |
## [1.12.4](v1.12.3...v1.12.4) (2024-10-10) ### Bug Fixes * use sendThreadPool in sendEvents ([#107](#107)) ([88a9589](88a9589))
🎉 This PR is included in version 1.12.4 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Summary
Issue #108
This PR consists of 2 main changes to address a performance bottleneck in the Amplitude client:
(1) Pass cached thread pool to supplyAsync
(2) Allow users to set
sendThreadPool
andretryThreadPool
During performance testing it was found Amplitude client would bottleneck on the default ForkJoinPool invoked indirectly via
CompletableFuture.supplyAsync(runnable)
which is not ideal for I/O:Many threads were parked due to Amplitude during testing and increasing the fork join pool resolved the issue.
Checklist