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

CORE-20794 Catching ProducerFencedException and rethrowing as a ProducerRequiresReset #6303

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

ben-millar
Copy link
Contributor

In Kafka broker failure resiliency tests, we were seeing ProducerFencedExceptions being thrown. Typically, these are as a result of trying to create a producer with a transactional.id which is still in use, however that shouldn't be possible in this situation.

Further investigation showed that a producer could also be fenced if it attempts an operation using an old epoch; this is a more likely option, due to a broker-side timeout caused by the injected Kafka failure. To combat this, we should catch the ProducerFencedException and re-throw it as a ProducerRequiresReset, which will trigger the producer to be safely reset in dependent components.

@ben-millar ben-millar force-pushed the bm/CORE-20794/wrapping-fenced-exception branch from 2a682a1 to 0a03f8d Compare July 29, 2024 12:13
Copy link

sonarcloud bot commented Jul 29, 2024

@corda-jenkins-ci02
Copy link
Contributor

Jenkins build for PR 6303 build 2

Build Successful:
Jar artifact version produced by this PR: 5.3.0.0-alpha-1722255231222
Helm chart version produced by this PR: 5.3.0-alpha.1722255231222
Helm chart pushed to: oci://corda-os-docker-dev.software.r3.com/helm-charts/pr-6303/corda
Helm chart Polaris score: 82

@ben-millar ben-millar marked this pull request as ready for review July 29, 2024 12:46
@ben-millar ben-millar requested a review from a team as a code owner July 29, 2024 12:46
@ben-millar ben-millar merged commit 14715e9 into release/os/5.3 Jul 29, 2024
5 checks passed
@ben-millar ben-millar deleted the bm/CORE-20794/wrapping-fenced-exception branch July 29, 2024 13:24
LWogan pushed a commit that referenced this pull request Oct 3, 2024
…cerRequiresReset (#6303)

The `ProducerFencedException` in these cases is likely due to an invalid epoch being used in an operation as a result of a timeout on the broker side. The correct action in this case is to reset the producer.
LWogan pushed a commit that referenced this pull request Oct 8, 2024
…cerRequiresReset (#6303)

The `ProducerFencedException` in these cases is likely due to an invalid epoch being used in an operation as a result of a timeout on the broker side. The correct action in this case is to reset the producer.
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