Skip to content

Commit

Permalink
Add message for ignored queries and fix full gtid at healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
noname0443 committed Dec 17, 2024
1 parent 7ad0f48 commit 8eb8c36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -2068,6 +2068,7 @@ func (app *App) getNodeState(host string) *NodeState {
node = app.cluster.Get(host)
}
nodeState := new(NodeState)
nodeState.ShowOnlyGTIDDiff = app.config.ShowOnlyGTIDDiff
err := func() error {
nodeState.CheckAt = time.Now()
nodeState.CheckBy = app.config.Hostname
Expand Down
1 change: 1 addition & 0 deletions internal/mysql/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func (n *Node) getQuery(name string) string {
func (n *Node) traceQuery(query string, arg interface{}, result interface{}, err error) {
query = queryOnliner.ReplaceAllString(query, " ")
if n.config.ShowOnlyGTIDDiff && IsGtidQuery(query) {
n.logger.Debug("<gtid query was ignored>")
return
}
msg := fmt.Sprintf("node %s running query '%s' with args %#v, result: %#v, error: %v", n.host, query, arg, result, err)
Expand Down

0 comments on commit 8eb8c36

Please sign in to comment.