-
Notifications
You must be signed in to change notification settings - Fork 976
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
Refactoring replication lag actions + Simulator (combined) #4144
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit introduces a first simulator for read_only monitoring ProxySQL itself will simulate hundreds of backends across hundreds of hostgroups, all configured in hundreds of clusters, and return read_only values for each of the simulated backend. The read_only value can be configured in table READONLY_STATUS available in the SQLite3Server module. If a backend isn't configured in table READONLY_STATUS , its default read_only value is 1. It is possible to simulate a lot of simultaneous failover running queries like the following: UPDATE READONLY_STATUS SET read_only=1; CREATE TABLE t1 AS SELECT hostname FROM READONLY_STATUS ORDER BY RANDOM() LIMIT 50; UPDATE READONLY_STATUS SET read_only=0 WHERE hostname IN (SELECT hostname FROM t1); DROP TABLE t1;
…providing proper waiting for 'SQLITE_BUSY'
…'ProxySQL_Admin::save_mysql_servers_runtime_to_database'
…ervers' and 'mysql_replication_hostgroups' from 'enable_readonly_testing'
This commit optimizes the read-only actions method by removing the dependency on proxysql admin tables. Instead, a separate mapping container is maintained, which records the state of the HGM servers. This avoids the need to call the commit method on every change, which improves performance. The changes in this commit also ensure that the mapping container is properly updated when servers are added, removed or modified.
# Conflicts: # lib/MySQL_Monitor.cpp
…into v2.x_refactor_read_only_action_with_simulator
…nto v2.x_refactor_read_only_action_with_simulator
* Introduced support for handling of bulk servers * Commented mysql_servers_wrlock as this method does not use admin tables.
retest this please |
…tion' into v2.x_refactor_replication_lag_action
rahim-kanji
changed the title
Replication Lag Simulator
Refactoring replication lag actions with Simulator (combined)
Mar 9, 2023
rahim-kanji
changed the title
Refactoring replication lag actions with Simulator (combined)
Refactoring replication lag actions + Simulator (combined)
Mar 9, 2023
JavierJF
reviewed
Mar 27, 2023
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.
PR looking great. Minor enhancements shared with PR #4127 suggested. Thanks!
retest this please |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added simulator for Replication Lag
Refactoring replication lag actions PR