Skip to content

Relax unnecessary checks for TKqpLocks proto fields #20920

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

Conversation

snaury
Copy link
Member

@snaury snaury commented Jul 10, 2025

Changelog entry

...

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

We historically used SendingShards/ReceivingShards in TKqpLocks for exchanging lock validation results. However, it has long been repurposed for generic commit/abort decision exchange. Now that we have operations (EvWrite with INSERT) which may fail due to constraint violation unrelated to locks, checking that SendingShards must have a lock is harmful. Relax these checks and decouple locks from sending/receiving shards. Now locks listed in the proto are always validated when present on commit (even when shard is not in the sending set for some reason), and readsets are always sent from shards in SendingShards.

This relaxation is safe to perform since current stable versions crash when encountering such data, and this patch doesn't change behavior otherwise. Intended for backporting into current stable versions.

Related to #19525.

@snaury snaury self-assigned this Jul 10, 2025
Copy link

github-actions bot commented Jul 10, 2025

🟢 2025-07-10 09:10:32 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Jul 10, 2025

2025-07-10 09:06:00 UTC Pre-commit check linux-x86_64-relwithdebinfo for 7bcafed has started.
2025-07-10 09:06:13 UTC Artifacts will be uploaded here
2025-07-10 09:09:36 UTC ya make is running...
🟡 2025-07-10 10:21:09 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?
29702 28278 0 7 1370 47

2025-07-10 10:23:47 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-07-10 10:38:08 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
403 (only retried tests) 360 0 0 7 36

🟢 2025-07-10 10:38:17 UTC Build successful.
🟢 2025-07-10 10:38:39 UTC ydbd size 2.2 GiB changed* by -848 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 966f177 merge: 7bcafed diff diff %
ydbd size 2 391 010 200 Bytes 2 391 009 352 Bytes -848 Bytes -0.000%
ydbd stripped size 500 108 328 Bytes 500 108 072 Bytes -256 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 Jul 10, 2025

2025-07-10 09:06:02 UTC Pre-commit check linux-x86_64-release-asan for 7bcafed has started.
2025-07-10 09:06:15 UTC Artifacts will be uploaded here
2025-07-10 09:09:26 UTC ya make is running...
🟡 2025-07-10 10:47:05 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14310 13865 0 225 197 23

🟢 2025-07-10 10:48:21 UTC Build successful.
🟢 2025-07-10 10:48:51 UTC ydbd size 3.9 GiB changed* by -4.8 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 966f177 merge: 7bcafed diff diff %
ydbd size 4 204 566 072 Bytes 4 204 561 160 Bytes -4.8 KiB -0.000%
ydbd stripped size 1 456 365 720 Bytes 1 456 364 120 Bytes -1.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

@snaury snaury marked this pull request as ready for review July 10, 2025 10:51
@snaury snaury requested a review from a team as a code owner July 10, 2025 10:51
@snaury snaury merged commit 0b5b1f6 into ydb-platform:main Jul 10, 2025
16 checks passed
@snaury snaury deleted the support-19525-write-send-readset-without-locks branch July 10, 2025 14:01
@serbel324 serbel324 mentioned this pull request Jul 14, 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.

2 participants