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

First POC for integration with ReadySet #4851

Open
wants to merge 3 commits into
base: v3.0
Choose a base branch
from
Open

Conversation

renecannao
Copy link
Contributor

Monitor is able to detect if a backend is a ReadySet server, and it enables special monitoring. The special monitoring hacks replication lag checks: a ReadySet server is "monitored for replication lag" , but it has a special query and a special handler. The query for check is "SHOW READYSET STATUS" , and the Status line is processed:

  • Online: the backend is configured as ONLINE
  • Maintenance* : the backend is configured as OFFLINE_SOFT
  • anything else, or failed check: SHUNNED

A new monitor table is also added: readyset_status_log . It has a similar structure of mysql_server_replication_lag_log , but instead of storing repl_lag (replication lag) the full output of SHOW READYSET STATUS is saved as a JSON (that can be queried using JSON_EXTRACT()

Monitor is able to detect if a backend is a ReadySet server, and it enables special monitoring.
The special monitoring hacks replication lag checks: a ReadySet server is "monitored for
replication lag" , but it has a special query and a special handler.
The query for check is "SHOW READYSET STATUS" , and the `Status` line is processed:
* Online: the backend is configured as ONLINE
* Maintenance* : the backend is configured as OFFLINE_SOFT
* anything else, or failed check: SHUNNED

A new monitor table is also added: `readyset_status_log` .
It has a similar structure of `mysql_server_replication_lag_log` , but instead of storing `repl_lag` (replication lag)
the full output of `SHOW READYSET STATUS` is saved as a JSON (that can be queried using `JSON_EXTRACT()`
INFO: if status is changed to ONLINE
WARNING : if status is changed to anything else
@altmannmarcelo
Copy link

altmannmarcelo commented Mar 12, 2025

Adding an update here. I tested and the integration is working as expected for MySQL.

Not sure if this should be addressed on this PR, however two missing functionalities:

  • Log a message when we change the status of a Readyset server
  • Add support for Readyset as a PostgreSQL server.

EDIT:
I just tested the new version:

2025-03-12 15:33:09 MySQL_HostGroups_Manager.cpp:4120:set_ReadySet_status(): [WARNING] Changing ReadySet status for server 127.0.0.1:3307 from HG 2 from ONLINE to OFFLINE_SOFT

The log message LGTM.

- Renamed ReadySet to Readyset
- fixed incorrect status variable
- added missing newlines
@renecannao
Copy link
Contributor Author

Support for PostgreSQL is pending.

Copy link

@altmannmarcelo altmannmarcelo left a comment

Choose a reason for hiding this comment

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

LGTM

@renecannao
Copy link
Contributor Author

retest this please

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.

2 participants