Skip to content

Commit

Permalink
Merge pull request #9743 from vbotbuildovich/backport-fixes-to-v23.1.…
Browse files Browse the repository at this point in the history
…x-221

[v23.1.x] c/topics_table: do not generate deltas for no op update properties
  • Loading branch information
mmaslankaprv authored Mar 31, 2023
2 parents 2cda706 + e14a127 commit 7a6624e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/v/cluster/topic_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ topic_table::apply(update_topic_properties_cmd cmd, model::offset o) {
co_return make_error_code(errc::topic_not_exists);
}
auto& properties = tp->second.get_configuration().properties;
auto properties_snapshot = properties;
auto& overrides = cmd.value;
/**
* Update topic properties
Expand Down Expand Up @@ -670,7 +671,10 @@ topic_table::apply(update_topic_properties_cmd cmd, model::offset o) {
overrides.remote_delete,
storage::ntp_config::default_remote_delete);
incremental_update(properties.segment_ms, overrides.segment_ms);

// no configuration change, no need to generate delta
if (properties == properties_snapshot) {
co_return errc::success;
}
// generate deltas for controller backend
const auto& assignments = tp->second.get_assignments();
_pending_deltas.reserve(_pending_deltas.size() + assignments.size());
Expand Down

0 comments on commit 7a6624e

Please sign in to comment.