Skip to content

Commit

Permalink
config: update bindings in property::reset and operator=
Browse files Browse the repository at this point in the history
Previously we just set the value without notifying bindings. This
lead to ignoring property value updates when the property was reset to
its default value as a result of a patch_cluster_config request
with non-empty "remove" section.

(cherry picked from commit 7411586)
  • Loading branch information
ztlpn authored and mmaslankaprv committed Feb 19, 2024
1 parent 2800f04 commit 7ac29ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/v/config/property.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,14 @@ class property : public base_property {
return validate(v);
}

void reset() override { _value = default_value(); }
void reset() override {
auto v = default_value();
update_value(std::move(v));
}

base_property& operator=(const base_property& pr) override {
_value = dynamic_cast<const property<T>&>(pr)._value;
auto v = dynamic_cast<const property<T>&>(pr)._value;
update_value(std::move(v));
return *this;
}

Expand Down

0 comments on commit 7ac29ae

Please sign in to comment.