Skip to content

fix: Retry on Transient Commit Errors in Rust#538

Merged
george-sentry merged 1 commit intomainfrom
george/fix/more-transient-errors
May 8, 2026
Merged

fix: Retry on Transient Commit Errors in Rust#538
george-sentry merged 1 commit intomainfrom
george/fix/more-transient-errors

Conversation

@george-sentry
Copy link
Copy Markdown
Member

Linear

Ref STREAM-856

Description

My previous PR (#535) fixed transient poll errors, but certain transient commit errors still crash the consumer. In this PR, I mirror the logic in the Python KafkaConsumer that retries certain kinds of errors. See the code here.

        ...
        retryable_errors = (
            KafkaError.REQUEST_TIMED_OUT,
            KafkaError.NOT_COORDINATOR,
            KafkaError._WAIT_COORD,
            KafkaError.COORDINATOR_LOAD_IN_PROGRESS,
        )

        commit_retry_policy = BasicRetryPolicy(
            3,
            1,
            lambda e: isinstance(e, KafkaException)
            and isinstance(e.args[0], KafkaError)
            and e.args[0].code() in retryable_errors,
        )
        ...

@george-sentry george-sentry requested review from a team as code owners May 8, 2026 16:47
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 8, 2026

STREAM-856

@george-sentry george-sentry merged commit 8a8418e into main May 8, 2026
17 checks passed
@george-sentry george-sentry deleted the george/fix/more-transient-errors branch May 8, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants