Skip to content

Add chatty logging to cluster & database dump/restore #14582

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

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

pixcc
Copy link
Member

@pixcc pixcc commented Feb 14, 2025

Changelog category

  • Not for changelog (changelog entry is not required)

Additional information

Предлагается добавить болтливое логгирование для новых команд, на которые еще никто не завязался:

  • ydb admin database dump
  • ydb admin database restore
  • ydb admin cluster dump
  • ydb admin cluster restore

Стандартное логгирование в CLI:

  • ydb (без параметров) - EMERG
  • ydb -v - WARN
  • ydb -vv - INFO
  • ydb -vvv - DEBUG

Болтливое логгирование в CLI:

  • ydb (без параметров) - INFO
  • ydb -v - DEBUG
  • ydb -vv - DEBUG
  • ydb -vvv - DEBUG

Мотивация:

  • Показывает пользователю, что что-то происходит, а не все зависло
  • Помогает пользователю дебажить проблемы самому или предоставлять нам сразу логи
  • Текущий флажок -v еще нужно догадаться, что можно использовать как -vvv для действительно verbose уровня логгирования
  • Для команд дампа и рестора писать лог привычно:
    • pg_probackup от PostgresPro по дефолту пишет лог уровня INFO в консоль
    • tiup br от TiDB по дефолту пишет подробный лог уровня INFO во временный файл, в консоль summary
  • В нашей реализации команд дампа и рестора в логе есть важные сообщения, которые хотелось бы показывать пользователю по дефолту

@pixcc pixcc requested a review from a team as a code owner February 14, 2025 13:18
@pixcc pixcc self-assigned this Feb 14, 2025
@pixcc pixcc requested a review from CyberROFL February 14, 2025 13:19
Copy link

github-actions bot commented Feb 14, 2025

2025-02-14 13:22:23 UTC Pre-commit check linux-x86_64-release-asan for 13fcc1c has started.
2025-02-14 13:22:36 UTC Artifacts will be uploaded here
2025-02-14 13:25:34 UTC ya make is running...
🟡 2025-02-14 14:30:06 UTC ydbd size 3.6 GiB changed* by +561.8 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 262bf50 merge: 13fcc1c diff diff %
ydbd size 3 884 571 136 Bytes 3 885 146 440 Bytes +561.8 KiB +0.015%
ydbd stripped size 1 360 179 824 Bytes 1 360 350 544 Bytes +166.7 KiB +0.013%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2025-02-14 14:30:08 UTC Check cancelled

Copy link

github-actions bot commented Feb 14, 2025

2025-02-14 13:22:26 UTC Pre-commit check linux-x86_64-relwithdebinfo for 13fcc1c has started.
2025-02-14 13:23:18 UTC Artifacts will be uploaded here
2025-02-14 13:26:18 UTC ya make is running...
🟡 2025-02-14 14:30:25 UTC ydbd size 2.1 GiB changed* by +320.2 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 7a0b0c7 merge: 13fcc1c diff diff %
ydbd size 2 233 687 528 Bytes 2 234 015 448 Bytes +320.2 KiB +0.015%
ydbd stripped size 474 041 688 Bytes 474 104 536 Bytes +61.4 KiB +0.013%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2025-02-14 14:30:27 UTC Check cancelled

Copy link

github-actions bot commented Feb 14, 2025

2025-02-14 14:34:39 UTC Pre-commit check linux-x86_64-relwithdebinfo for dc2171d has started.
2025-02-14 14:35:05 UTC Artifacts will be uploaded here
2025-02-14 14:38:20 UTC ya make is running...
🟡 2025-02-14 15:31:37 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
26168 23571 0 1 2458 138

2025-02-14 15:34:25 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-02-14 16:00:12 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
203 (only retried tests) 74 0 1 2 126

2025-02-14 16:00:23 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-02-14 16:17:23 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
189 (only retried tests) 64 0 0 1 124

🟢 2025-02-14 16:17:31 UTC Build successful.
🟢 2025-02-14 16:17:52 UTC ydbd size 2.1 GiB changed* by +64 Bytes, which is < 100.0 KiB vs main: OK

ydbd size dash main: a2e1626 merge: dc2171d diff diff %
ydbd size 2 234 015 384 Bytes 2 234 015 448 Bytes +64 Bytes +0.000%
ydbd stripped size 474 104 536 Bytes 474 104 536 Bytes 0 Bytes 0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Feb 14, 2025

2025-02-14 14:36:47 UTC Pre-commit check linux-x86_64-release-asan for dc2171d has started.
2025-02-14 14:37:01 UTC Artifacts will be uploaded here
2025-02-14 14:40:04 UTC ya make is running...
🟡 2025-02-14 15:54:40 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
12003 11900 0 54 13 36

2025-02-14 15:56:17 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-02-14 16:14:13 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
162 (only retried tests) 121 0 5 5 31

2025-02-14 16:14:22 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-02-14 16:30:32 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
72 (only retried tests) 35 0 4 4 29

🟢 2025-02-14 16:30:42 UTC Build successful.
🟢 2025-02-14 16:31:14 UTC ydbd size 3.6 GiB changed* by +128 Bytes, which is < 100.0 KiB vs main: OK

ydbd size dash main: a2e1626 merge: dc2171d diff diff %
ydbd size 3 885 146 312 Bytes 3 885 146 440 Bytes +128 Bytes +0.000%
ydbd stripped size 1 360 350 608 Bytes 1 360 350 544 Bytes -64 Bytes -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@pixcc pixcc enabled auto-merge (squash) February 14, 2025 14:39
@pixcc pixcc merged commit c15923e into ydb-platform:main Feb 14, 2025
12 checks passed
lberserq pushed a commit to lberserq/ydb that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants