-
Notifications
You must be signed in to change notification settings - Fork 579
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
make si mode two separate flags #4812
Conversation
This change breaks forward compatibility. Also I think it's better to base it on top of @mmaslankaprv 's change on Serde |
Currently |
@@ -397,11 +399,12 @@ struct property_update<tristate<T>> { | |||
struct incremental_topic_updates { | |||
static constexpr int8_t version_with_data_policy = -1; | |||
static constexpr int8_t version_with_shadow_indexing = -3; | |||
static constexpr int8_t version_with_separate_si_flags = -4; | |||
// negative version indicating different format: | |||
// -1 - topic_updates with data_policy | |||
// -2 - topic_updates without data_policy | |||
// -3 - topic_updates with shadow_indexing |
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: comment about version -4?
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.
on the other hand, the names are self descriptive
return; | ||
} | ||
} | ||
|
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.
that was genuinely terrible, good riddance
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, the only reservation that I have is that we might soon transition to serde so the serialisation of this commands might be done much simpler. In this form it breaks forward compatibility. We won't be able to roll back redpanda to previous version if at least one topic is created.
It's not obvious to me why the on-disk encoding needs to change: it was already storing two bits of information (packed into shadow_indexing_mode), so surely it can store the same thing as two boolean attributes stores? Couldn't we just do some logic in the encode/decode path that changes converts from "two bools" into "value of shadow_indexing_mode"? |
@jcsp you mean not to change What about We actually have |
Will split into commits that build later.
Also need to think about compatibility
Fixes: #4499