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

correctly handle hitting MaxTabletsScheduled in drain #5845

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

vporyadke
Copy link
Collaborator

Changelog entry

fix a bug where tablet drain could finish prematurely

Changelog category

  • Bugfix

Additional information

...

Copy link

github-actions bot commented Jun 21, 2024

2024-06-21 16:54:50 UTC Pre-commit check for 8c47ef5 has started.
2024-06-21 16:57:11 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-06-21 16:59:18 UTC Build successful.
2024-06-21 16:59:32 UTC Tests are running...
🔴 2024-06-21 18:30:58 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13925 12561 0 5 1345 14

🟡 2024-06-21 18:31:49 UTC ydbd size 8.3 GiB changed* by +779.3 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 2141961 merge: 8c47ef5 diff diff %
ydbd size 8 957 537 784 Bytes 8 958 335 832 Bytes +779.3 KiB +0.009%
ydbd stripped size 488 287 656 Bytes 488 323 304 Bytes +34.8 KiB +0.007%

*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 Jun 21, 2024

2024-06-21 16:55:34 UTC Pre-commit check for 8c47ef5 has started.
2024-06-21 16:58:01 UTC Build linux-x86_64-release-asan is running...
🟢 2024-06-21 17:00:36 UTC Build successful.
2024-06-21 17:00:45 UTC Tests are running...
🔴 2024-06-21 19:07:58 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9678 9084 0 96 329 169

🟢 2024-06-21 19:08:49 UTC ydbd size 5.5 GiB changed* by +32.0 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 8064a1b merge: 8c47ef5 diff diff %
ydbd size 5 853 120 752 Bytes 5 853 153 552 Bytes +32.0 KiB +0.001%
ydbd stripped size 1 255 377 128 Bytes 1 255 383 400 Bytes +6.1 KiB +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 Jun 21, 2024

2024-06-21 17:02:19 UTC Pre-commit check for 8c47ef5 has started.
2024-06-21 17:04:45 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-06-21 17:07:02 UTC Build successful.

Copy link

github-actions bot commented Jun 24, 2024

2024-06-24 15:29:40 UTC Pre-commit check for 68d14f8 has started.
2024-06-24 15:31:58 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-06-24 15:34:35 UTC Build successful.

Copy link

github-actions bot commented Jun 24, 2024

2024-06-24 15:31:17 UTC Pre-commit check for 68d14f8 has started.
2024-06-24 15:33:49 UTC Build linux-x86_64-release-asan is running...
🟢 2024-06-24 15:36:36 UTC Build successful.
2024-06-24 15:36:51 UTC Tests are running...
🔴 2024-06-24 17:41:57 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9674 9095 0 89 322 168

🟢 2024-06-24 17:42:49 UTC ydbd size 5.5 GiB changed* by +22.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: a6621e3 merge: 68d14f8 diff diff %
ydbd size 5 859 018 608 Bytes 5 859 041 280 Bytes +22.1 KiB +0.000%
ydbd stripped size 1 256 172 552 Bytes 1 256 176 456 Bytes +3.8 KiB +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 Jun 24, 2024

2024-06-24 15:31:20 UTC Pre-commit check for 68d14f8 has started.
2024-06-24 15:33:52 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-06-24 15:37:00 UTC Build successful.
2024-06-24 15:37:12 UTC Tests are running...
🔴 2024-06-24 17:11:21 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13945 12582 0 6 1348 9

🔴 2024-06-24 17:12:03 UTC ydbd size 8.4 GiB changed* by +2.4 MiB, which is >= 2.0 MiB vs main: Alert

ydbd size dash main: 5e4ed6c merge: 68d14f8 diff diff %
ydbd size 8 964 796 736 Bytes 8 967 303 552 Bytes +2.4 MiB +0.028%
ydbd stripped size 488 533 640 Bytes 488 614 920 Bytes +79.4 KiB +0.017%

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

Comment on lines 813 to 820
TBestNodeResult result = FindBestNode(*tablet);
if (result.BestNode == nullptr) {
Execute(CreateRestartTablet(tabletId));
} else if (result.BestNode != tablet->Node) {
if (IsTabletMoveExpedient(*tablet, *result.BestNode)) {
Execute(CreateRestartTablet(tabletId));
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checks here are pointless - we kill the tablet if there is no node for it, but leave it if there is a different node with the move not being expedient. Also the checks did not guarantee that the tablet would be restarted on a different node - because things might change between this moment and the restart tablet transaction. Since I have to touch this code, removing them seems best - unconditional tablet restart is reasonable for Kick, that's what people use it for.

@vporyadke vporyadke requested a review from adameat June 25, 2024 06:07
Copy link

github-actions bot commented Jun 25, 2024

2024-06-25 08:31:26 UTC Pre-commit check for add38c1 has started.
2024-06-25 08:33:56 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-06-25 08:36:21 UTC Build successful.
2024-06-25 08:36:36 UTC Tests are running...
🔴 2024-06-25 10:08:34 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13946 12592 0 3 1339 12

🟢 2024-06-25 10:09:23 UTC ydbd size 8.4 GiB changed* by +47.5 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 1078162 merge: add38c1 diff diff %
ydbd size 8 970 289 744 Bytes 8 970 338 360 Bytes +47.5 KiB +0.001%
ydbd stripped size 488 720 744 Bytes 488 722 472 Bytes +1.7 KiB +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 Jun 25, 2024

2024-06-25 08:31:30 UTC Pre-commit check for add38c1 has started.
2024-06-25 08:34:07 UTC Build linux-x86_64-release-asan is running...
🟢 2024-06-25 08:37:05 UTC Build successful.
2024-06-25 08:37:18 UTC Tests are running...
🔴 2024-06-25 10:48:07 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9685 9072 0 105 329 179

🟢 2024-06-25 10:49:12 UTC ydbd size 5.5 GiB changed* by +24.4 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 1078162 merge: add38c1 diff diff %
ydbd size 5 860 956 552 Bytes 5 860 981 528 Bytes +24.4 KiB +0.000%
ydbd stripped size 1 256 493 416 Bytes 1 256 498 088 Bytes +4.6 KiB +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 Jun 25, 2024

2024-06-25 08:31:32 UTC Pre-commit check for add38c1 has started.
2024-06-25 08:34:04 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-06-25 08:36:46 UTC Build successful.

@vporyadke vporyadke merged commit a20a03d into ydb-platform:main Jun 25, 2024
8 of 12 checks passed
vporyadke added a commit to vporyadke/ydb that referenced this pull request Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants