-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
"changed" flag in system.settings is calculated incorrectly for settings with multiple values #48516
"changed" flag in system.settings is calculated incorrectly for settings with multiple values #48516
Conversation
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.
Good finding. Looks like this inconsistency existed since SettingFieldMultiEnum
type introduction for a couple of MySQL datatypes. Although test failures are now related. Looks like the tests are wrong:
[----------] 6 tests from SettingMySQLDataTypesSupport
[ RUN ] SettingMySQLDataTypesSupport.WithDECIMAL
[ OK ] SettingMySQLDataTypesSupport.WithDECIMAL (0 ms)
[ RUN ] SettingMySQLDataTypesSupport.WithDATE
[ OK ] SettingMySQLDataTypesSupport.WithDATE (0 ms)
[ RUN ] SettingMySQLDataTypesSupport.With1
[ OK ] SettingMySQLDataTypesSupport.With1 (0 ms)
[ RUN ] SettingMySQLDataTypesSupport.WithMultipleValues
[ OK ] SettingMySQLDataTypesSupport.WithMultipleValues (0 ms)
[ RUN ] SettingMySQLDataTypesSupport.SetString
src/Core/tests/gtest_settings.cpp:125: Failure
Value of: setting.changed
Actual: true
Expected: false
[ FAILED ] SettingMySQLDataTypesSupport.SetString (0 ms)
[ RUN ] SettingMySQLDataTypesSupport.SetInvalidString
src/Core/tests/gtest_settings.cpp:166: Failure
Value of: setting.changed
Actual: true
Expected: false
[ FAILED ] SettingMySQLDataTypesSupport.SetInvalidString (0 ms)
[----------] 6 tests from SettingMySQLDataTypesSupport (0 ms total)
Do you mean it's ok if we change these tests for new behavior?
|
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.
Yes, I think it is totally fine to change the tests
@serxa It looks like the failure of the tests is caused not by my changes. Could we merge PR? |
Stateless tests (release) — fail: 1 — 00992_system_parts_race_condition_zookeeper_long #48665 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed incorrect "changed" flag evaluation for settings with multiple values.
How to reproduce:
Result
Meanwhile other types of settings, works as expected:
Result