[MDEV-22570] Split wsrep_provider_options in several options Created: 2020-05-15 Updated: 2023-06-26 Resolved: 2023-02-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, Variables |
| Fix Version/s: | 11.0.1 |
| Type: | Task | Priority: | Critical |
| Reporter: | Richard Stracke | Assignee: | Julius Goryavsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Preview_11.0 | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
In some cases length 2048 for wsrep_provider_options are not sufficient and the string will be truncated in show variables output and information_schema.system_variables
UPDATE: UPDATE after issue was closed:
is required to enable this new behavior to split the Galera Cluster system variable wsrep_provider_options into separate Galera Cluster system variables, instead of managing them in one large string. With
the old behavior is used, with the given limitation of the max length a system variable can have. The default is
|
| Comments |
| Comment by Jan Lindström (Inactive) [ 2020-12-16 ] | ||||||
| ||||||
| Comment by Teemu Ollakka [ 2021-02-12 ] | ||||||
|
It seems to be possible to implement wsrep_provider plugin to expose wsrep provider options as system variables. This however requires that the provider library is loaded before plugins so that the default options string can be read from the provider and plugin variables can be generated before the plugin in loaded. I have POC implementation under work, and see that there will be following limitations which this approach will bring:
Do these limitations sound reasonable from usage point of view? I saw also the following issues with current Galera:
I believe these can be worked on Galera side. | ||||||
| Comment by Jan Lindström (Inactive) [ 2021-03-04 ] | ||||||
|
teemu.ollakka As now wsrep_provider is read only I do not mind that wsrep_provider_options is also read only. | ||||||
| Comment by Daniele Sciascia [ 2022-09-01 ] | ||||||
|
ralf.gebhardt you will get around 80 - 90 options out of this. | ||||||
| Comment by Daniele Sciascia [ 2022-09-01 ] | ||||||
|
ralf.gebhardt would the above be acceptable? | ||||||
| Comment by Daniel Black [ 2022-09-06 ] | ||||||
|
If plugin-load-add=wsrep_plugin was used wsrep_provider_plugin_enabled as a variable becomes redundant. Or better, plugin-load-add=galera (with plugin-dir symlink in packaging) as an implementer of the wsrep API is there (replacing wsrep_provider=x and the fake wsrep_provider plugin). Galera can expose variables in a standard MYSQL_SYSVAR way, which it almost does anyway. Then all provider system variables automaticity become galera_gcache_dir, galera_repl.max_ws_size etc. For compatibility/legacy interface wsrep_provider_options_check / wsrep_provider_options_check break up the option list and pass each option though the plugin check/update mechanism. With this the number of new options is reduced (eliminated?) and the facility to treat galera system variables as standard unlimited variables becomes available. | ||||||
| Comment by Jan Lindström (Inactive) [ 2022-09-06 ] | ||||||
|
sciascid Can you see if suggested changes could be done please. | ||||||
| Comment by Daniele Sciascia [ 2022-09-06 ] | ||||||
|
danblack thanks for the feedback! I'll look into your suggestions | ||||||
| Comment by Daniele Sciascia [ 2022-09-14 ] | ||||||
|
danblack I looked into your suggestions.
I think this is possible.
Are you suggesting we load galera library (i.e. libgalera_ssm.so) through mariadb's plugin interface?
Notice that in the current pull request wsrep_provider_options is still supported when the plugin is disabled. And when the plugin is enabled wsrep_provider_options becomes read only. This way a user is either using the old wsrep_provider_options or the new single options. Not both at the same. I think this is a sensible choice, do you agree? | ||||||
| Comment by Daniel Black [ 2022-09-15 ] | ||||||
|
> Are you suggesting we load galera library (i.e. libgalera_ssm.so) through mariadb's plugin interface? yes > Even if we were to do this, we would still not be able to have a list of pre-declared variables (to expose using the standard MYSQL_SYSVAR way), because the library does not have one. Internally, different modules populate their own variables at runtime. It could be made could populate the MYSQL_SYSVAR array during the plugin initialization with a restructure of the internal modules of galera. > Notice that in the current pull request wsrep_provider_options is still supported when the plugin is disabled. Why is this useful? How is error handling on value bounds done? No other plugin needs such a feature. A careful look at the initialization order would remove this need. > And when the plugin is enabled wsrep_provider_options becomes read only. This way a user is either using the old wsrep_provider_options or the new single options. Not both at the same. I think this is a sensible choice, do you agree? So rather restructuring galera to work like a mariadb/mysql plugin, the wsrep_api gained an entire configuration service, its own re-invention of variable types. So mariadb is getting a lot of padding (debt would be the unfriend term) to avoid galera doing any change or actually behaving like a mariadb plugin. | ||||||
| Comment by Daniele Sciascia [ 2022-09-15 ] | ||||||
|
>> Notice that in the current pull request wsrep_provider_options is still supported when the plugin is disabled. > Why is this useful? How is error handling on value bounds done? No other plugin needs such a feature. A careful look at the initialization order would remove this need. This comment is confusing to me. Which feature are you talking about? > So rather restructuring galera to work like a mariadb/mysql plugin, the wsrep_api gained an entire configuration service, its own re-invention of variable types. I'm not sure I agree with this. The "configuration service" is literally one function call. Overall, I think what this pull request is doing, is very similar to what you propose, minus the loading of galera through mariadb plugin interface. | ||||||
| Comment by Daniele Sciascia [ 2022-09-16 ] | ||||||
|
The pull request has been updated to get rid of variable wsrep_provider_plugin_enabled, as per first suggestion by danblack: Since this is a built-in plugin, it appears that instead of plugin-load-add, one is supposed to use - | ||||||
| Comment by Daniel Black [ 2022-10-28 ] | ||||||
|
edit: needed upstream galera 4.x latest to work.
| ||||||
| Comment by Daniele Sciascia [ 2022-11-22 ] | ||||||
|
Elsewhere, it was suggested to me that we could just hard code variables in the plugin, instead of fetching them from Galera and populate them dynamically (as it is done in the current proposal). | ||||||
| Comment by Jan Lindström (Inactive) [ 2022-11-28 ] | ||||||
|
branch : bb-10.1- | ||||||
| Comment by Jan Lindström (Inactive) [ 2022-11-28 ] | ||||||
|
Config required to use new feature :
| ||||||
| Comment by Jan Lindström (Inactive) [ 2022-11-28 ] | ||||||
|
Test plan :
| ||||||
| Comment by Jan Lindström (Inactive) [ 2022-12-09 ] | ||||||
|
Updated branch : preview-10.11- | ||||||
| Comment by Ramesh Sivaraman [ 2023-01-18 ] | ||||||
|
ok to push | ||||||
| Comment by Jan Lindström (Inactive) [ 2023-01-24 ] | ||||||
|
Updated branch: bb-11.0-galera-split-wsrep-provider-options |