-
Notifications
You must be signed in to change notification settings - Fork 597
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
admin
: add cloud_storage_cache_size
check to config_multi_property_validation()
#23337
admin
: add cloud_storage_cache_size
check to config_multi_property_validation()
#23337
Conversation
fbc3575
to
72ed807
Compare
Force push to:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/54559#0191fe3d-f92a-467c-9040-db9657762ad2 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/54559#0191fe3d-f926-48fb-8a1e-5788cf2fd8dc ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/54588#019200a1-0d74-4ad6-8cb0-c70d823d8327 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/54634#01920226-6eec-43ea-bee4-1b031425460b |
72ed807
to
62570f1
Compare
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.
Looks good
To encapsulate the logic for validating a `cluster` level configuration for the properties `cloud_storage_cache_size` and `cloud_storage_cache_size_percent`. The following configurations are determined to be invalid: 1. `cloud_storage_cache_size` and `cloud_storage_cache_size_percent` cannot both be 0 2. `cloud_storage_cache_size` cannot be 0 while `cloud_storage_cache_size_percent` is nil (`std::nullopt`)
To prevent the invalid configuration of `cloud_storage_cache_size` and `cloud_storage_cache_size_percent` both equal to 0, add a new check to the `admin` server validation post `patch_cluster_config_handler()` call. Validation is performed at the admin endpoint level to prevent users from configuring the cluster settings to one of these invalid states, which would result in the cloud cache calculating its max size as 0.
62570f1
to
5cf66f8
Compare
Force push to:
|
new failures in https://buildkite.com/redpanda/redpanda/builds/54588#019200b7-1e9a-4b4e-ac1e-8809f15858b2:
|
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, though I think the number ducktape tests are a bit much. Seems like the kind of think a unit test should cover.
5cf66f8
to
f91a706
Compare
Force push to:
|
f91a706
to
0df8fdd
Compare
/backport v24.2.x |
/backport v24.1.x |
Failed to create a backport PR to v24.1.x branch. I tried:
|
using cache_size_pct_type = double; | ||
static constexpr auto epsilon | ||
= std::numeric_limits<cache_size_pct_type>::epsilon(); | ||
|
||
if ((cache_size_pct < epsilon) && (cloud_storage_cache_size() == 0)) { |
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.
please add a commit that adds a comment explaining this. i read the docs for epsilon, but i don't see how it fits into this calculation
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.
For double
floating-point comparison to 0- is there a different way you prefer doing this?
I can update the commit history to be clear.
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.
I can update the commit history to be clear.
this already merged, so i think it'll have to be a comment?
To prevent the invalid configuration of
cloud_storage_cache_size
andcloud_storage_cache_size_percent
both being equal to0
, add a new check to theadmin
server validation postpatch_cluster_config_handler()
call.The following configurations are hereby invalid:
cloud_storage_cache_size
andcloud_storage_cache_size_percent
cannot both be 0cloud_storage_cache_size
cannot be0
whilecloud_storage_cache_size_percent
isnil
(std::nullopt
)Relevant slack thread: https://redpandadata.slack.com/archives/C02BDN76HUK/p1724373318548299
Relevant docs PR: redpanda-data/docs#696 (comment)
Backports to versions
v24.1.x
andv24.2.x
are optional and left to the reviewers to decide if necessary.Backports Required
Release Notes