feat(connectors): retry transient Doris Stream Load failures in-request#3574
Open
ryankert01 wants to merge 1 commit into
Open
feat(connectors): retry transient Doris Stream Load failures in-request#3574ryankert01 wants to merge 1 commit into
ryankert01 wants to merge 1 commit into
Conversation
The Doris sink classified transient Stream Load outcomes (5xx/408/429, transport errors, Publish Timeout) as retryable but never acted on them: the runtime commits the consumer offset at poll time before consume() runs and discards its return value, so a transient backend blip silently dropped the batch under at-most-once delivery. consume() now retries a transiently-failed batch in-request, re-PUTing under the same deterministic label so Doris dedupes a prior attempt that actually landed (e.g. a 2xx whose body could not be read). Permanent failures are never retried. Backoff and jitter come from iggy_connector_sdk::retry, bounded by new max_retries/retry_delay/max_retry_delay config (defaults 3/200ms/5s). This shrinks the at-most-once window within a single poll; cross-poll and crash delivery remain a runtime concern, not something a sink can fix. Relates to apache#3215.
|
Thanks for the PR. It is labeled Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3574 +/- ##
=============================================
- Coverage 74.07% 46.37% -27.70%
Complexity 937 937
=============================================
Files 1249 1246 -3
Lines 128248 111821 -16427
Branches 104116 87689 -16427
=============================================
- Hits 94994 51853 -43141
- Misses 30219 57300 +27081
+ Partials 3035 2668 -367
🚀 New features to boost your workflow:
|
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.
Which issue does this PR address?
Relates to #3215
Rationale
Follow-up to the Doris sink (#3215). The connector already classified transient Stream Load outcomes as retryable but had no retry path, so under the runtime's at-most-once delivery a transient backend blip silently dropped the batch.
What changed?
The Doris sink classified transient Stream Load outcomes (
5xx/408/429, transport errors,Publish Timeout) asCannotStoreDatabut never retried them: the runtime commits the consumer offset at poll time beforeconsume()runs and discards its return value, so a transient failure dropped the batch with no replay.consume()now retries a transiently-failed batch in-request via a newload_batch()that wraps send plus status classification, re-PUTing under the same deterministic label so Doris dedupes a prior attempt that actually landed (e.g. a2xxwhose body could not be read). Permanent failures (4xx,Fail, schema/redirect problems) are never retried. Backoff and jitter come fromiggy_connector_sdk::retry, bounded by newmax_retries/retry_delay/max_retry_delayconfig (defaults 3 / 200ms / 5s). This shrinks the at-most-once window within a single poll; cross-poll and crash delivery stay a runtime concern.Local Execution
license-headershook cannot execute on this machine (its script needs bash 4+mapfile; only bash 3.2 is present), buthawkeye checkpasses directly and CI enforces it.markdownlint,taplo,cargo fmt,cargo clippy -p iggy_connector_doris_sink --all-targets -- -D warnings, andcargo test -p iggy_connector_doris_sink(41 tests) all pass.AI Usage
.expect), and permanent-not-retried. Full crate suite, clippy, and doc lint pass locally.