-
Notifications
You must be signed in to change notification settings - Fork 596
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-7743] cluster
: tiered storage topic property update fixes
#23545
Conversation
136f9b6
to
941ca96
Compare
This comment was marked as outdated.
This comment was marked as outdated.
980b9d1
to
b33245c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
b33245c
to
21ce425
Compare
cluster
: tiered storage topic property fixescluster
: tiered storage topic update fixes
cluster
: tiered storage topic update fixescluster
: tiered storage topic property update fixes
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.
Thanks for picking this up, it's looking good.
Do we want to backport this all the way? I think there's no technical reason why we couldn't, but I'm wondering if this should go into a patch release.
21ce425
to
ae4d02c
Compare
91d67b6
to
9d34ec8
Compare
9d34ec8
to
32eb837
Compare
32eb837
to
0faad94
Compare
1ecaefc
to
7957f50
Compare
Force push to:
|
7957f50
to
c50d1fd
Compare
9d107ae
to
141c43b
Compare
Force push to:
|
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.
Some final minor things left but otherwise it looks good to me.
@@ -76,6 +76,8 @@ valid, but does not apply it. | |||
// at the same time, so we issue first the set request for write, | |||
// then the rest of the requests. | |||
// See https://github.com/redpanda-data/redpanda/issues/9191 | |||
// TODO: Remove this once v24.2 is EOL. | |||
// See https://github.com/redpanda-data/redpanda/pull/23545. | |||
_, isRRR := setKVs["redpanda.remote.read"] |
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.
We can't backport this PR because of the feature gate, but if we wanted to fix these bugs in older versions we could implement this request-splitting logic that rpk is doing inside redpanda in 24.1/24.2/23.3. It might be worth asking product if we want to do that.
To be clear, I think we should get this PR in because this seems like the right long-term fix, but since these bugs are important we might want to release a backportable fix for them as well.
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.
We can't backport this PR because of the feature gate, but if we wanted to fix these bugs in older versions we could implement this request-splitting logic that rpk is doing inside redpanda in 24.1/24.2/23.3. It might be worth asking product if we want to do that.
I think it's a good idea, so that it can work with other tools that support setting arbitrary config.
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.
Agreed, these are pretty important bugs, it would be good to fix them in previous versions.
This should be done in a future PR, but for now my focus is on v24.3
.
84283da
to
feea5e4
Compare
feea5e4
to
cfd0f59
Compare
Force push to:
|
f6e2b1c
to
be4a8c2
Compare
Force push to:
|
To feature guard the new code path taken for the `shadow_indexing` topic property, add it to the feature table. Clusters past version `v24.3` will follow the new, bug free code path in the `topic_table` for their `AlterConfig`/`IncrementalAlterConfig` requests, while older clusters will follow the now deprecated code-path. Also, update `partition_properties_stm` to use the new `release_version` enum.
In order to deprecate and better control call sites that use this field, move it to a `private` field and add get/set functions. Also modify use-sites and constructors that can no longer treat `incremental_topic_updates` as an aggregate for initialization.
To deal with the bugs that have come about due to use of the `shadow_indexing` field in the `AlterConfig`/`IncrementalAlterConfig` APIs, split the update field into two seperate `property_update<bool>`s, `remote_read` and `remote_write`. This fixes any bugs that were present and described in the JIRA thread here: https://redpandadata.atlassian.net/browse/CORE-7743 For legacy reasons, the old `incremental_update` function for `shadow_indexing` must still be available, in case of an older broker sending topic property updates to an updated broker. However, updated clusters with the new feature flag `shadow_indexing_split_topic_property_update` active will use the `remote_read` and `remote_write` fields for their `incremental_update`s.
Adds `test_shadow_indexing_alter_configs` and `test_shadow_indexing_incremental_alter_configs`.
Also add some `node` parameters to `KCL` related functions in order to allow the issuing of Kafka requests to specific brokers.
Kafka ignores case when setting a boolean property: https://github.com/apache/kafka/blob/master/clients/src/main/... ...java/org/apache/kafka/common/config/ConfigDef.java#L690-L710 Realign ourselves with Kafka by transforming the string value to lowercase before parsing it in `parse_and_set_bool()`.
These workarounds should be removed in a future version of `redpanda` (once `v24.2` is EOL), now that bug fixes are in place in the core. They are left here for now to ensure backwards compatibility between an upgraded version of `rpk` and an un-upgraded `redpanda` cluster.
be4a8c2
to
540ae13
Compare
Force push to:
|
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.
lgtm, but let's get someone else to review this as well
@@ -152,8 +167,17 @@ create_topic_properties_update(alter_configs_resource& resource) { | |||
continue; | |||
} | |||
if (cfg.name == topic_property_remote_read) { | |||
// Legacy update for shadow indexing field | |||
{ | |||
if (shadow_indexing_split_update) { |
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.
nit: can we get rid of 'shadow indexing' in the name? maybe just 'tiered-storage'?
the SI comes from the very first implementation which was called 'shadow indexing' and since then it was renamed everywhere. I don't mind if the name will stay though. It will be easier to connect it with the old flag.
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.
also the 'split' in the name focuses on the low level detail, it will probably be confusing for some people
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.
Given that the topic property is still named shadow_indexing
, I think it would be best if this rename was applied there as well in a future PR. What do you think?
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.
LGTM, one minor nit regarding the name
Relevant JIRA ticket: https://redpandadata.atlassian.net/browse/CORE-7743
Relevant historical threads: #9191, #23220 (comment), #5846.
This PR fixes some bugs that have been present in how
redpanda
handlesAlterConfig
andIncrementalAlterConfig
API calls and the tiered storage topic propertiesredpanda.remote.read
,redpanda.remote.write
.These bugs are well described in the above links, but the TL;DR is that a command like
rpk topic alter-config t --set redpanda.remote.write=true --set redpanda.remote.read=false
cannot properly describe both the addition of write permissions and the removal of read permissions due to the binary implementation ofshadow_indexing_mode
.The
topic_property
layer is left untouched, but theincremental_topic_updates
has had itsproperty_update<shadow_indexing_mode>
field deprecated (privatized in the struct, explicit getters/setters must be used to access it) and two new fieldsproperty_update<bool> remote_read/write
added.These fields will be used for topic property updates from now on, for clusters past
v24.3
with the feature flagshadow_indexing_split_topic_property_update
active. Unfortunately, we must keep theshadow_indexing
related updates in the code to maintain backwards compatibility with olderredpanda
versions.Another important change to note is that
rpk topic alter-config t --delete redpanda.remote.write --delete redpanda.remote.read
now behaves as expected, in resetting those topic level permissions to the cluster default.DescribeConfigs
requests will also now accurately print the topic level permissions (these bugs were being chased in closed PR #23220. This current PR should be considered a replacement for that one).Closes #5846, closes #4499, closes #11749
Backports Required
Release Notes
Bug Fixes
AlterConfig
andIncrementalAlterConfig
requests modifyingredpanda.remote.read
andredpanda.remote.write
simultaneously were not being properly respected.DescribeConfigs
requests would misrepresent the state ofredpanda.remote.read
andredpanda.remote.write
.