From 8eb8c36dc252802d75de66a6197718531e738dd6 Mon Sep 17 00:00:00 2001 From: noname0443 Date: Tue, 17 Dec 2024 10:43:46 +0300 Subject: [PATCH] Add message for ignored queries and fix full gtid at healthcheck --- internal/app/app.go | 1 + internal/mysql/node.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/app/app.go b/internal/app/app.go index 9243597..82771b6 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -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 diff --git a/internal/mysql/node.go b/internal/mysql/node.go index dbf6190..0998e9a 100644 --- a/internal/mysql/node.go +++ b/internal/mysql/node.go @@ -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("") return } msg := fmt.Sprintf("node %s running query '%s' with args %#v, result: %#v, error: %v", n.host, query, arg, result, err)