-
Notifications
You must be signed in to change notification settings - Fork 15k
KAFKA-15267: Do not allow Tiered Storage to be disabled while topics have remote.storage.enable property #14161
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
Changes from all commits
c4df5a7
fe804b0
ad74ccb
d6ee529
ecd0e77
2c25147
4ef98a8
771d3aa
a6ddc1d
20e4a5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -871,12 +871,17 @@ class LogManager(logDirs: Seq[File], | |
| * Update the configuration of the provided topic. | ||
| */ | ||
| def updateTopicConfig(topic: String, | ||
| newTopicConfig: Properties): Unit = { | ||
| newTopicConfig: Properties, | ||
| isRemoteLogStorageSystemEnabled: Boolean): Unit = { | ||
| topicConfigUpdated(topic) | ||
| val logs = logsByTopic(topic) | ||
| // Combine the default properties with the overrides in zk to create the new LogConfig | ||
| val newLogConfig = LogConfig.fromProps(currentDefaultConfig.originals, newTopicConfig) | ||
| // We would like to validate the configuration no matter whether the logs have materialised on disk or not. | ||
| // Otherwise we risk someone creating a tiered-topic, disabling Tiered Storage cluster-wide and the check | ||
| // failing since the logs for the topic are non-existent. | ||
| LogConfig.validateRemoteStorageOnlyIfSystemEnabled(newLogConfig.values(), isRemoteLogStorageSystemEnabled, true) | ||
|
||
| if (logs.nonEmpty) { | ||
| // Combine the default properties with the overrides in zk to create the new LogConfig | ||
| val newLogConfig = LogConfig.fromProps(currentDefaultConfig.originals, newTopicConfig) | ||
| logs.foreach { log => | ||
| val oldLogConfig = log.updateConfig(newLogConfig) | ||
| if (oldLogConfig.compact && !newLogConfig.compact) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we allow the tiered storage functionality disablement since no data is in remote when
logsis empty?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm, I would prefer we don't. Otherwise one can end up in a situation where they have topics with remote.storage.enable=true and tiered storage cluster-wide disabled.