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

Drafting mysql_hostgroup_attributes #4091

Merged
merged 13 commits into from Jan 31, 2023

Conversation

renecannao
Copy link
Contributor

@renecannao renecannao commented Jan 28, 2023

This PR is built on top of #4078

Some rework to try to reduce duplicated code
In Admin:
- replaced a lot of flush_[...]__from_memory_to_disk() and flush_[...]__from_disk_to_memory() with a generic flush_GENERIC__from_to()
- several commands like "LOAD MYSQL SERVERS FROM DISK" and similar are automatically generated for various modules (not all) and saved/map in a map load_save_disk_commands
- FlushCommandWrapper() is able to map the various LOAD/SAVE from/to DISK into commands to run on SQLite
@mirostauder
Copy link
Collaborator

retest this please

1 similar comment
@renecannao
Copy link
Contributor Author

retest this please

This commit adds some minimal testing for mysql_hostgroup_attributes .
It helped detecting some bugs.
Fixes:
* minor memory leak when running CHECKSUM command
* minor memory leak in load_mysql_servers_to_runtime()
* not initialized json in MySQL_Event (valgrind doesn't like it)
* not initialized variable MySQL_Thread::shutdown in the constructor
If mysql_hostgroup_attributes.multiplex:
- 0 : multiplexing is always disabled
- 1 : multiplexing is enabled for the hostgroup, but other criteria can disable multiplexing (transaction, temp tables, query rules, etc)
Implementation of mysql_hostgroup_attributes.free_connections_pct and mysql_hostgroup_attributes.connection_warming

If mysql_hostgroup_attributes is configured:
- mysql_hostgroup_attributes.free_connections_pct has higher priority than global variable mysql-free_connections_pct
- mysql_hostgroup_attributes.connection_warming has higher priority than global variable mysql-connection_warming
Implementation of mysql_hostgroup_attributes.throttle_connections_per_sec

If mysql_hostgroup_attributes is configured,
mysql_hostgroup_attributes.throttle_connections_per_sec has higher
priority than global variable mysql-throttle_connections_per_sec_to_hostgroup
@renecannao
Copy link
Contributor Author

retest this please

1 similar comment
@renecannao
Copy link
Contributor Author

retest this please

@renecannao renecannao merged commit cfe5c0b into v2.x Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants