-
Notifications
You must be signed in to change notification settings - Fork 960
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
Closes #3310: Improve error reporting for 'MySQL_Monitor' and 'MySQL_Session' backend connections via counters #3311
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
851339b
Closes #3310: Improve error reporting for 'MySQL_Monitor' and 'MySQL_…
JavierJF 9bffef4
Added missed default initialization of flag 'registered_prometheus_co…
JavierJF 9713abd
Improved naming on new 'PROXYSQL_ERR' enums and explicit values
JavierJF 84e205d
Removed 'PROXYSQL_MONITOR_ERR' enum in favor of single enum 'PROXYSQL…
JavierJF 7c1c829
Compressed multiple 'p_update_mysql_error_counter' with ternary opera…
JavierJF 6587049
Removed hardcoded values for error codes in counters in 'monitor_conn…
JavierJF 1deee92
Added extra wait after setting 'max_replication_lag' in test 'test_se…
JavierJF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,26 @@ struct cmp_str { | |
#define AWS_Aurora_Nentries 50 | ||
|
||
#define N_L_ASE 16 | ||
|
||
/** | ||
* Enum holding the different connection errors that could be reached for | ||
* the backend connections oppened by 'MySQL_Monitor' module. | ||
*/ | ||
enum PROXYSQL_MONITOR_ERR { | ||
ER_PROXYSQL_ASSUME_SRV_READ_ONLY = 10000, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my other comments, I think 7 enums should go away, and 5 should stay |
||
ER_PROXYSQL_GR_HEALTH_CHECK_TIMEOUT, | ||
ER_PROXYSQL_GR_HEALTH_CHECKS_MISSED, | ||
ER_PROXYSQL_READ_ONLY_CHECK_CONN_TIMEOUT, | ||
ER_PROXYSQL_READ_ONLY_CHECK_TIMEOUT, | ||
ER_PROXYSQL_GALERA_HEALTH_CHECK_CONN_TIMEOUT, | ||
ER_PROXYSQL_GALERA_HEALTH_CHECK_TIMEOUT, | ||
ER_PROXYSQL_HEALTH_CHECKS_MISSED, | ||
ER_PROXYSQL_SRV_NULL_REPLICATION_LAG, | ||
ER_PROXYSQL_AWS_NO_PINGABLE_SRV, | ||
ER_PROXYSQL_AWS_HEALTH_CHECK_CONN_TIMEOUT, | ||
ER_PROXYSQL_AWS_HEALTH_CHECK_TIMEOUT, | ||
}; | ||
|
||
/* | ||
|
||
Implementation of monitoring in AWS Aurora will be different than previous modules | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,17 @@ | |
|
||
#define RESULTSET_BUFLEN 16300 | ||
|
||
/** | ||
* Enum holding the different MySQL connection errors that are used to report | ||
* invalid states in the backend connections. | ||
*/ | ||
enum PROXYSQL_MYSQL_ERR { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While here, we could also have added error codes 9001 to 9003 |
||
ER_PROXYSQL_OFFLINE_SRV = 9004, | ||
ER_PROXYSQL_LAGGING_SRV, | ||
ER_PROXYSQL_PING_TIMEOUT, | ||
ER_PROXYSQL_CHANGE_USER_TIMEOUT | ||
}; | ||
|
||
extern MySQL_Variables mysql_variables; | ||
|
||
/* The default mariadb-connecter 3.1.4 does not yet implement CLIENT_DEPRECATE_EOF | ||
|
Oops, something went wrong.
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.
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.
Any reason why we have
PROXYSQL_MONITOR_ERR
and not just extendPROXYSQL_MYSQL_ERR
?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.
I thought it could be handy to have a clear separation between general errors and monitoring errors, easier to remember error code ranges that particular values.
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.
I think it makes the maintenance more difficult.
Especially in cases in which they overlap.
For example, a ping can timeout no matter if in MySQL Session or on Monitor.
On the same topic, I think I don't see a counter for ping timeout in Monitor