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

Slightly improve logging #152

Merged
merged 5 commits into from
Jan 10, 2025

Conversation

noname0443
Copy link
Collaborator

When we use gtid diff in health check, we should ignore the gtid field on a replica, because it doesn't know the gtid of a source and always sends master state not defined.
We see now:

INFO: healthcheck: <ping=ok repl=running sync=--s ro=true offline=false lag=0.68 du=7.84% cr=no gtid=master state not defined>

I changed it to:

INFO: healthcheck: <ping=ok repl=running sync=--s ro=true offline=false lag=0.68 du=7.84% cr=no>

When we request data using getClusterStateFromDB, we know at least information about the disk usage and the daemon state on the local node and can output it to the log file.
We see now:

INFO: cs: map[mysql1:<ping=ok repl=master sync=--- ro=false offline=false lag=0.00 du=??? cr=??? gtid=gtid1:1-1820834>]
INFO: dcs cs: map[mysql1:<ping=ok repl=master sync=--- ro=false offline=false lag=0.00 du=17.40% cr=no gtid=gtid1:1-1820829>]

I changed it to:

INFO: cs: map[mysql1:<ping=ok repl=master sync=--- ro=false offline=false lag=0.00 du=10.00% cr=no gtid=gtid1:1-1820834>]
INFO: dcs cs: map[mysql1:<ping=ok repl=master sync=--- ro=false offline=false lag=0.00 du=17.40% cr=no gtid=gtid1:1-1820829>]

internal/app/app.go Outdated Show resolved Hide resolved
@teem0n teem0n merged commit 259919e into yandex:master Jan 10, 2025
52 checks passed
@noname0443 noname0443 deleted the slightly_improve_logging_01 branch January 10, 2025 10:07
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