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

k/protocol: Checking for tag value to be 0 #11443

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/v/kafka/protocol/errors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ std::string_view error_code_to_str(error_code error) {
case error_code::transactional_id_not_found:
return "transactional_id_not_found";
default:
std::terminate(); // make gcc happy
return "unknown_error_code";
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the logic here is we should crash because if we say we support a version of a certain kafka API and we observe an unknown error code, it means there's a bug in redpanda and the handler is implemented incorrectly.

Copy link
Contributor

Choose a reason for hiding this comment

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

But I guess that is debatable though, realistically perhaps crashing is too harsh.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I guess that is debatable though, realistically perhaps crashing is too harsh.

I feel like this is an easy DoS to run against RP

}
}

Expand Down