Skip to content

DataShard: prioritize cancellation processing for reads #15398

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

Conversation

snaury
Copy link
Member

@snaury snaury commented Mar 6, 2025

Changelog entry

...

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

When datashard has a lot of simple incoming read requests the latency may grow and read requests are eventually cancelled by latency sensitive clients. However, this cancellation had no chance of being processed in many cases, which caused a metastable state where datashard has a long request queue in the mailbox, processing cancelled requests. Use low-priority transactions when starting reads, which makes read cancellation higher priority.

Fixes #14936.

@snaury snaury self-assigned this Mar 6, 2025
Copy link

github-actions bot commented Mar 6, 2025

🟢 2025-03-06 09:52:38 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Mar 6, 2025

2025-03-06 09:54:34 UTC Pre-commit check linux-x86_64-relwithdebinfo for 7741198 has started.
2025-03-06 09:54:50 UTC Artifacts will be uploaded here
2025-03-06 09:57:41 UTC ya make is running...
🟡 2025-03-06 10:49:33 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?
19199 17853 0 3 1222 121

2025-03-06 10:51:12 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-03-06 11:04:27 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?
177 (only retried tests) 63 0 2 4 108

2025-03-06 11:04:39 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-03-06 11:18:08 UTC Some tests failed, follow the links below.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
156 (only retried tests) 49 0 2 0 105

🟢 2025-03-06 11:18:24 UTC Build successful.
🟢 2025-03-06 11:18:44 UTC ydbd size 2.1 GiB changed* by +48 Bytes, which is < 100.0 KiB vs main: OK

ydbd size dash main: 7fc471f merge: 7741198 diff diff %
ydbd size 2 293 146 328 Bytes 2 293 146 376 Bytes +48 Bytes +0.000%
ydbd stripped size 480 458 432 Bytes 480 458 368 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

Copy link

github-actions bot commented Mar 6, 2025

2025-03-06 09:54:51 UTC Pre-commit check linux-x86_64-release-asan for 7741198 has started.
2025-03-06 09:55:06 UTC Artifacts will be uploaded here
2025-03-06 09:57:47 UTC ya make is running...
🟡 2025-03-06 11:06:21 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?
11735 11364 0 259 74 38

2025-03-06 11:07:25 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-03-06 11:20:55 UTC ydbd size 3.7 GiB changed* by +82.8 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 89fbf3d merge: 7741198 diff diff %
ydbd size 3 993 538 432 Bytes 3 993 623 224 Bytes +82.8 KiB +0.002%
ydbd stripped size 1 388 716 392 Bytes 1 388 750 792 Bytes +33.6 KiB +0.002%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2025-03-06 11:20:56 UTC Check cancelled

@snaury snaury requested a review from azevaykin March 6, 2025 11:01
@snaury snaury marked this pull request as ready for review March 6, 2025 11:01
@snaury snaury force-pushed the bugfix-14936-cancel-enqueued-reads-2 branch from fb92f39 to a35becf Compare March 6, 2025 11:20
Copy link

github-actions bot commented Mar 6, 2025

2025-03-06 11:23:12 UTC Pre-commit check linux-x86_64-release-asan for e126fe7 has started.
2025-03-06 11:23:26 UTC Artifacts will be uploaded here
2025-03-06 11:26:23 UTC ya make is running...
🟡 2025-03-06 12:39:01 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?
12126 11984 0 84 20 38

2025-03-06 12:40:24 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-03-06 12:55:55 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?
199 (only retried tests) 158 0 7 1 33

2025-03-06 12:56:07 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-03-06 13:08:09 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
71 (only retried tests) 39 0 0 1 31

🟢 2025-03-06 13:08:16 UTC Build successful.
🟢 2025-03-06 13:08:45 UTC ydbd size 3.7 GiB changed* by +752 Bytes, which is < 100.0 KiB vs main: OK

ydbd size dash main: cda52e1 merge: e126fe7 diff diff %
ydbd size 3 995 175 008 Bytes 3 995 175 760 Bytes +752 Bytes +0.000%
ydbd stripped size 1 389 081 256 Bytes 1 389 081 640 Bytes +384 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 Mar 6, 2025

2025-03-06 11:23:12 UTC Pre-commit check linux-x86_64-relwithdebinfo for e126fe7 has started.
2025-03-06 11:23:29 UTC Artifacts will be uploaded here
2025-03-06 11:26:29 UTC ya make is running...
🟡 2025-03-06 12:26:38 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?
26491 23907 0 1 2467 116

2025-03-06 12:29:24 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-03-06 12:41:27 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
162 (only retried tests) 58 0 0 0 104

🟢 2025-03-06 12:41:37 UTC Build successful.
🟢 2025-03-06 12:41:56 UTC ydbd size 2.1 GiB changed* by -192 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: cda52e1 merge: e126fe7 diff diff %
ydbd size 2 293 954 392 Bytes 2 293 954 200 Bytes -192 Bytes -0.000%
ydbd stripped size 480 563 328 Bytes 480 563 264 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

@snaury snaury merged commit 6fe3b58 into ydb-platform:main Mar 6, 2025
12 checks passed
@snaury snaury deleted the bugfix-14936-cancel-enqueued-reads-2 branch March 6, 2025 13:14
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.

DataShard: prioritize cancellation processing for reads
2 participants