Skip to content

config: make all backlog_controller properties needs_restart::no #27106

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

WillemKauf
Copy link
Contributor

@WillemKauf WillemKauf commented Aug 2, 2025

The two use cases of the backlog_controller in the code presently are the compaction_controller and the upload_controller. In both cases, there are cluster properties associated with the PID values used in the backlog_controller_config, which presently require a restart to take effect.

There is no strong reason for this to be the case. To enable making these values changeable at run-time, alter the backlog_controller_config and use of it in the backlog_controller to instead use config::bindings around the raw value types.

While this does throw away some of the bare value type simplicity of the backlog_controller design, the benefits and actual use cases of this class in the codebase are a good motivation for making this change.

The properties for the upload_controller and compaction_controller can now be marked as not needing a restart to take effect, since all of their uses are now bindings.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.2.x
  • v25.1.x
  • v24.3.x
  • v24.2.x

Release Notes

  • none

…ng`s

The two use cases of the `backlog_controller` in the code presently
are the `compaction_controller` and the `upload_controller`. In both cases,
there are cluster properties associated with the PID values used in the
`backlog_controller`, which presently require a restart to take effect.

There is no strong reason for this to be the case. To enable making
these values changeable at run-time, alter the `backlog_controller_config`
and use of it in the `backlog_controller` to instead use `config::binding`s
around the raw value types.

While this does throw away some of the bare value type simplicity of the
`backlog_controller` design, the benefits and actual use cases of this
class in the codebase are a good motivation for making this change.
The properties for the `upload_controller` and `compaction_controller`
can now be marked as not needing a restart to take effect, since
all of their uses are now bindings.
(space_info.capacity / 100) * backlog_capacity_percents
/ ss::smp::count);

auto backlog_size_function = [capacity = space_info.capacity] {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this (like the upload_controller_config) should use available disk space as a setpoint/normalization factor instead of capacity 🤔

= ss::fs_avail(config::node().data_directory().path.string()).get();
int64_t setpoint = 0;
int64_t normalization = static_cast<int64_t>(available)
auto space_info = std::filesystem::space(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be a synchronous call here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant