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 BulkProcessor deadlock when bulk requests fail (#47599) #48013

Closed
wants to merge 2 commits into from

Conversation

suxinglee
Copy link

In #47599 we known that if the BulkProcessor results in failed bulk requests, they will be retried via the RetryHandler. In versions of Elasticsearch prior to 7.3.0 this can result in a deadlock.

It seems that there is a similar deadlock problem in the Elasticsearch version after 7.3.0.
Different from #46790, here we first execute the Flush logic ,then the shared thread pool Scheduler cannot execute the retry logic, so the flush logic cannot be ended. Causes the ReentrantLock cannot be obtained by the user thread in internalAdd method.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Java High Level REST Client)

@jakelandis jakelandis self-assigned this Oct 17, 2019
@jakelandis jakelandis self-requested a review October 17, 2019 13:19
@jakelandis jakelandis removed their assignment Oct 17, 2019
@jakelandis
Copy link
Contributor

closing in favor of #48697

Thanks again @suxinglee for finding this issue as well as the test case. I described that PR's description why I chose to use separate schedulers instead on increasing the number of the single scheduler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants