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-7998] PoC: Tiered Storage Sanctioning #23895

Closed

Conversation

BenPope
Copy link
Member

@BenPope BenPope commented Oct 23, 2024

Implement sanctions for tiered storage topic properties.

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
  • v24.2.x
  • v24.1.x
  • v23.3.x

Release Notes

  • none

@BenPope BenPope marked this pull request as ready for review October 23, 2024 18:46
@BenPope BenPope force-pushed the core-7998-tiered-storage-sanctioning branch from bf16de9 to 64c71b8 Compare October 24, 2024 16:37
@redpanda-data redpanda-data deleted a comment from vbotbuildovich Oct 24, 2024
@redpanda-data redpanda-data deleted a comment from vbotbuildovich Oct 24, 2024
@redpanda-data redpanda-data deleted a comment from vbotbuildovich Oct 24, 2024
@redpanda-data redpanda-data deleted a comment from vbotbuildovich Oct 24, 2024
Comment on lines 151 to 152
// TODO (ben): probably best to partition the requests and only
// fail the topics that have SI enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

would probably throw a log message in there as well about why

Copy link
Member Author

Choose a reason for hiding this comment

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

We already get something like:

WARN  2024-10-30 21:41:54,557 [shard 0:main] kafka - config_utils.h:287 - Failed to alter topic properties of topic(s) {{kafka/full}} error_code observed: cluster::errc::feature_disabled

Copy link
Contributor

@pgellert pgellert Oct 31, 2024

Choose a reason for hiding this comment

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

+1 I think I would err on the side of being more verbose and add an extra log line. Specifically, I think this would be a good place to call out why the feature is disabled (they don't have a valid enterprise license) and how they can get out of the error (get a valid license).

@redpanda-data redpanda-data deleted a comment from vbotbuildovich Oct 29, 2024
@redpanda-data redpanda-data deleted a comment from vbotbuildovich Oct 29, 2024
@redpanda-data redpanda-data deleted a comment from vbotbuildovich Oct 29, 2024
@redpanda-data redpanda-data deleted a comment from vbotbuildovich Oct 29, 2024
Signed-off-by: Ben Pope <ben@redpanda.com>
Signed-off-by: Ben Pope <ben@redpanda.com>
Signed-off-by: Ben Pope <ben@redpanda.com>
Fixes CORE-7999

Signed-off-by: Ben Pope <ben@redpanda.com>
Fixes CORE-8000

Signed-off-by: Ben Pope <ben@redpanda.com>
@BenPope BenPope force-pushed the core-7998-tiered-storage-sanctioning branch from 64c71b8 to 39cacb2 Compare October 30, 2024 21:46
@BenPope
Copy link
Member Author

BenPope commented Oct 30, 2024

Changes in force-push

  • Rebase
  • Rewite

maybe_remove_flag(mode, update_props.remote_read, si_mode::drop_fetch);
maybe_remove_flag(mode, update_props.remote_write, si_mode::drop_archival);

if (mode != si_mode::disabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We still want to allow them to alter non-enterprise topic configs (e.g. retention.ms) for their already-tiered storage-enabled topics.

Suggested change
if (mode != si_mode::disabled) {
if (mode != si_mode::disabled || mode == current_mode) {

I think we should also drop 237-242 and have a similar check for remote_delete as well, where we check if it becomes enabled && it was not enabled.

There's a subtle but important behaviour difference here based on whether the tiered storage topic properties are explicitly specified or not. The case where this matters that I am thinking about is when customers manage their topic properties with terraform. As far as know, the terraform providers issue AlterTopicConfigs updates with all topic configs specified. Let's say they have an existing topic with TS enabled, their license expired yesterday, and they want to update retention.ms. With the existing code, they wouldn't be able to do that because terraform's AlterTopicsRequest would specify the enabled tiered storage topic properties explicitly as enabled and this check would fail - even though that is the existing state of the topic property and they are just trying to change a non-TS topic property. So I think we want to drop 237-242 and change all checks to be of the style becomes_enabled(X) && X != old_X.

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.

3 participants