Migrate from HLRC to elasticsearch-java 8.x client - #1
Merged
Conversation
yeikel
force-pushed
the
migrate-java-client
branch
3 times, most recently
from
May 6, 2026 22:56
f43efd9 to
024302d
Compare
yeikel
force-pushed
the
migrate-java-client
branch
3 times, most recently
from
May 14, 2026 01:25
34a8f3f to
7633ea6
Compare
yeikel
commented
May 14, 2026
yeikel
commented
May 14, 2026
yeikel
force-pushed
the
migrate-java-client
branch
7 times, most recently
from
May 15, 2026 06:41
57a7517 to
4a6d2ce
Compare
yeikel
force-pushed
the
migrate-java-client
branch
10 times, most recently
from
May 15, 2026 21:22
2be24cc to
643eada
Compare
yeikel
force-pushed
the
migrate-java-client
branch
10 times, most recently
from
May 19, 2026 21:01
6157170 to
5bee901
Compare
yeikel
force-pushed
the
migrate-java-client
branch
4 times, most recently
from
May 29, 2026 03:48
ee4e127 to
83888d1
Compare
Replace the deprecated High Level REST Client with the new elasticsearch-java 8.x client.
…ntainer throwIfFailed() was calling close() before propagating the error. close() calls BulkIngester.close() with a flushTimeoutMs=3min timeout waiting for in-flight requests to drain. With ES down, this blocked the task thread for up to 3 minutes, preventing the task from transitioning to FAILED until after the test's 2-minute await window expired. The Connect framework calls task.stop() -> client.close() immediately after put() throws, so the defensive close inside throwIfFailed() was redundant. Removing it lets the task fail fast via the standard task lifecycle.
…eadlock
BulkIngester submits afterBulk callbacks to bulkScheduler via scheduler.submit().
Its single scheduler thread can block inside FnCondition.awaitUninterruptibly()
while waiting for a concurrency slot (requestsInFlightCount < maxConcurrentRequests).
When DispatchingTransport shared bulkScheduler for retry tasks (introduced in the
previous commit), that created a deadlock:
1. bulkScheduler thread blocks in sendRequestCondition.awaitUninterruptibly()
waiting for an in-flight slot to free up.
2. Freeing a slot requires result.completeExceptionally() to fire, which requires
the retry task to run.
3. The retry task is queued in bulkScheduler, but bulkScheduler is blocked.
4. Neither side can proceed — the connector task stays RUNNING indefinitely.
Fix: give DispatchingTransport its own dedicated single-threaded retryScheduler so
retry tasks are never blocked by BulkIngester's flush tasks.
yeikel
force-pushed
the
migrate-java-client
branch
from
May 29, 2026 03:50
83888d1 to
80672d1
Compare
BulkIngester.backoffPolicy and DispatchingTransport both used config.maxRetries(), causing up to (maxRetries+1)^2 HTTP requests per document: each BulkIngester per-item 429 retry issued a new bulk request that re-entered DispatchingTransport with a fresh retry budget. Removing backoffPolicy gives DispatchingTransport sole ownership of the retry budget. HTTP-level 429s (whole-request) continue to be retried as exceptions by DispatchingTransport; per-item 429s in a 200 response go to the listener's error path (DLQ + task failure), matching pre-migration HLRC behavior.
yeikel
force-pushed
the
migrate-java-client
branch
4 times, most recently
from
June 1, 2026 01:42
30294de to
4c357d9
Compare
yeikel
marked this pull request as ready for review
July 9, 2026 18:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same as confluentinc#920 but CI runs here