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

kafka/server: Improve kafka::map_topic_error_code v2 #2428

Merged

Conversation

BenPope
Copy link
Member

@BenPope BenPope commented Sep 24, 2021

Note: Let's wait for this to bake on test-staging for a bit before merge.

This is a copy of #2422 but buildkite didn't spot that I changed the base to dev and is failing.

Cover letter

Map cluster::errc::no_leader_controller to kafka::error_code::not_controller so that the error is retriable, with metadata refresh.

Fixes #2406

Also:

  • Improve logging by using vlog
  • Improve switch case to force compilation error when new cluster::errc is introduced.

See #2425 for followup work.

Release notes

Release note: redpanda/kafka: leader_not_available is now a retriable error.

Signed-off-by: Ben Pope <ben@vectorized.io>
Instead of returning `unknown_server_error`, return `not_controller`

This is a retriable error code, with metadata refresh.

Fixes redpanda-data#2406

Signed-off-by: Ben Pope <ben@vectorized.io>
When a new `cluster::errc` is added, a compilation error will force
consideration of the mapping here.

Signed-off-by: Ben Pope <ben@vectorized.io>
Signed-off-by: Ben Pope <ben@vectorized.io>
@BenPope BenPope changed the title Improve kafka map topic error code v2 kafka/server: Improve kafka::map_topic_error_code v2 Sep 24, 2021
@BenPope
Copy link
Member Author

BenPope commented Sep 26, 2021

I didn't see any failures in the last 9 runs on test-staging, so this should be good to go.

Copy link
Member

@mmaslankaprv mmaslankaprv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mmaslankaprv mmaslankaprv merged commit 17bd571 into redpanda-data:dev Sep 27, 2021
BenPope added a commit to BenPope/redpanda that referenced this pull request Sep 29, 2021
PR redpanda-data#2428 changed the returned error code so that the error was
retriable with a metadata refresh, but kafka-configs.sh doesn't retry.

Call describe_topic to wait for the controller, as it performs a retry.

Fix redpanda-data#2406

Signed-off-by: Ben Pope <ben@vectorized.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure in RetentionPolicyTest.test_changing_topic_retention_with_restart
2 participants