Skip to content
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

Rewrite the correct databases value when dbnum is clamped to 1 in cluster mode #1856

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

Conversation

enjoy-binbin
Copy link
Member

In cb1fff3, we will override the databases
config at startup to 1 in cluster mode. When the user than calls CONFIG REWRITE,
it will write out the value of 1 to the config file. We should still write
out the configured value in this case.

This closes #1853.

…ster mode

In cb1fff3, we will override the databases
config at startup to 1 in cluster mode. When the user than calls CONFIG REWRITE,
it will write out the value of 1 to the config file. We should still write
out the configured value in this case.

This closes valkey-io#1853.

Signed-off-by: Binbin <[email protected]>
@enjoy-binbin enjoy-binbin requested a review from madolson March 18, 2025 08:26
Signed-off-by: Binbin <[email protected]>
Signed-off-by: Binbin <[email protected]>
@@ -0,0 +1,8 @@
start_cluster 1 0 {tags {external:skip cluster}} {
test "CONFIG REWRITE databases" {
assert_equal 16 [lindex [r config get databases] 1]
Copy link
Member Author

Choose a reason for hiding this comment

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

noted that with this change, config get will always get the config_dbnum

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.98%. Comparing base (ed28746) to head (055666d).
Report is 3 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1856      +/-   ##
============================================
- Coverage     71.09%   70.98%   -0.12%     
============================================
  Files           123      123              
  Lines         65671    65672       +1     
============================================
- Hits          46687    46614      -73     
- Misses        18984    19058      +74     
Files with missing lines Coverage Δ
src/config.c 78.40% <100.00%> (+0.01%) ⬆️
src/server.h 100.00% <ø> (ø)

... and 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zuiderkwast zuiderkwast added the release-notes This issue should get a line item in the release notes label Mar 18, 2025
Copy link
Collaborator

@hpatro hpatro left a comment

Choose a reason for hiding this comment

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

Should this be treated as a breaking change?

@hpatro
Copy link
Collaborator

hpatro commented Mar 18, 2025

With the upcoming PR of multi databases #1671, databases config wouldn't be clamped down further for cluster mode as we're introducing cluster-databases. So, do we wait for 9.0 for this to get resolved with #1671 or do we take this change in right away ?

@enjoy-binbin
Copy link
Member Author

i am guessing @madolson brought it up with the intention of including it in 8.1? OR just a tmp fix that lives in unstable unit we get multdb support in 9.0

@enjoy-binbin
Copy link
Member Author

Should this be treated as a breaking change?

not sure about it, i'd probably prefer it to be a bugfix.

@zuiderkwast
Copy link
Contributor

I think we can release it in 9.0 together with cluster-databases. They are related. No reason to confuse users about this in 8.1 release notes.

@zuiderkwast
Copy link
Contributor

If I understood correctly, we decided in the meeting two days ago that we will do this change. We can already mark it as major-decision-approved?

Copy link
Member

@madolson madolson left a comment

Choose a reason for hiding this comment

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

Cool.

@zuiderkwast zuiderkwast added the major-decision-approved Major decision approved by TSC team label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-decision-approved Major decision approved by TSC team release-notes This issue should get a line item in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] We should not rewrite configuration values when we clamp them.
4 participants