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

Disabled partitions implementation #15141

Merged
merged 12 commits into from
Nov 29, 2023

Conversation

ztlpn
Copy link
Contributor

@ztlpn ztlpn commented Nov 27, 2023

  • Shut down disabled partitions in controller_backend
  • Skip disabled partitions in balancers
  • Forbid partition replica reconfiguration commands for disabled topics/partitions
  • Return appropriate error codes for kafka requests related to disabled partitions

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.2.x
  • v23.1.x
  • v22.3.x

Release Notes

Features

  • Added the ability do disable whole topics and specific topic partitions. Disabled partitions are ignored by Redpanda and producing/consuming to them is impossible. This is useful when only a handful of partitions prevent the cluster from becoming healthy (e.g. if the data in them is corrupted in a way that causes Redpanda to crash).

@@ -1603,6 +1607,12 @@ ss::future<add_paritions_tx_reply> tx_gateway_frontend::do_add_partition_to_tx(
res_partition.partition_index = req_partition;
res_partition.error_code = tx_errc::none;
res_topic.results.push_back(res_partition);
} else if (
disabled_set && disabled_set->is_disabled(req_partition)) {
Copy link
Member

@mmaslankaprv mmaslankaprv Nov 27, 2023

Choose a reason for hiding this comment

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

nit: maybe we can add a method bool is_disabled(const model::ntp&) const in metadata_cache as i see this patter repeating all over the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a small optimization - we query the disabled set for the topic once and then use it, instead of looking up the topic disabled set for each partition.

@rockwotj
Copy link
Contributor

We also need to disable reads and writes in the transform subsystem.

@ztlpn
Copy link
Contributor Author

ztlpn commented Nov 27, 2023

@rockwotj Can you give me some code pointers? Where should I insert those checks?

@ztlpn ztlpn force-pushed the recovery-mode-disable-partitions branch from 83ff0f9 to db57397 Compare November 27, 2023 23:42
@vbotbuildovich
Copy link
Collaborator

@ztlpn ztlpn force-pushed the recovery-mode-disable-partitions branch from db57397 to b1449fe Compare November 28, 2023 13:28
@ztlpn ztlpn added this to the v23.3.1-rc2 milestone Nov 29, 2023
Copy link
Contributor

@rockwotj rockwotj left a comment

Choose a reason for hiding this comment

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

I only reviewed the last two commits, as I'm missing some context on the other commits here, but the transform changes LGTM.

src/v/cluster/plugin_frontend.cc Show resolved Hide resolved
@ztlpn ztlpn merged commit 913b4e1 into redpanda-data:dev Nov 29, 2023
20 checks passed
@ztlpn ztlpn deleted the recovery-mode-disable-partitions branch November 29, 2023 19:35
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.

4 participants