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

cluster: fix errc::invalid_node_operation typo #2099

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/v/cluster/errc.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ enum class errc : int16_t {
sequence_out_of_order,
generic_tx_error,
node_does_not_exists,
invalid_node_opeartion,
invalid_node_operation,
invalid_configuration_update,
topic_operation_error,
no_eligible_allocation_nodes,
Expand Down Expand Up @@ -118,7 +118,7 @@ struct errc_category final : public std::error_category {
return "Generic error when processing transactional requests";
case errc::node_does_not_exists:
return "Requested node does not exists";
case errc::invalid_node_opeartion:
case errc::invalid_node_operation:
return "Requested node opeartion is invalid";
case errc::invalid_configuration_update:
return "Requested configuration update is invalid";
Expand Down
4 changes: 2 additions & 2 deletions src/v/cluster/members_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ std::error_code members_table::apply(decommission_node_cmd cmd) {
if (
it->second->get_membership_state()
!= model::membership_state::active) {
return errc::invalid_node_opeartion;
return errc::invalid_node_operation;
}
vlog(
clusterlog.info,
Expand All @@ -106,7 +106,7 @@ std::error_code members_table::apply(recommission_node_cmd cmd) {
if (
it->second->get_membership_state()
!= model::membership_state::draining) {
return errc::invalid_node_opeartion;
return errc::invalid_node_operation;
}
vlog(
clusterlog.info,
Expand Down
2 changes: 1 addition & 1 deletion src/v/cluster/scheduling/allocation_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void allocation_state::deallocate(const model::broker_shard& replica) {
result<uint32_t> allocation_state::allocate(model::node_id id) {
if (auto it = _nodes.find(id); it != _nodes.end()) {
if (it->second->is_full()) {
return errc::invalid_node_opeartion;
return errc::invalid_node_operation;
}
return it->second->allocate();
}
Expand Down
2 changes: 1 addition & 1 deletion src/v/cluster/topic_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ topic_table::apply(finish_moving_partition_replicas_cmd cmd, model::offset o) {

if (current_assignment_it->replicas != cmd.value) {
return ss::make_ready_future<std::error_code>(
errc::invalid_node_opeartion);
errc::invalid_node_operation);
}

_update_in_progress.erase(cmd.key);
Expand Down
2 changes: 1 addition & 1 deletion src/v/redpanda/admin_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ void map_broker_state_update_error(model::node_id id, std::error_code ec) {
case cluster::errc::node_does_not_exists:
throw ss::httpd::not_found_exception(
fmt::format("broker with id {} not found", id));
case cluster::errc::invalid_node_opeartion:
case cluster::errc::invalid_node_operation:
throw ss::httpd::bad_request_exception(fmt::format(
"can not update broker {} state, ivalid state transition "
"requested",
Expand Down