Skip to content

Conversation

@azevaykin
Copy link
Collaborator

Changelog entry

More tests for LocksBrokenAsBreaker, LocksBrokenAsVictim in sys_view query_metrics_one_minute

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

Copilot AI review requested due to automatic review settings January 6, 2026 16:42
@azevaykin azevaykin requested a review from a team as a code owner January 6, 2026 16:42
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

🟢 2026-01-06 16:43:59 UTC The validation of the Pull Request description is successful.

@ydbot
Copy link
Collaborator

ydbot commented Jan 6, 2026

Run Extra Tests

Run additional tests for this PR. You can customize:

  • Test Size: small, medium, large (default: all)
  • Test Targets: any directory path (default: ydb/)
  • Sanitizers: ASAN, MSAN, TSAN
  • Coredumps: enable for debugging (default: off)
  • Additional args: custom ya make arguments

▶  Run tests

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive tests for Transaction Lock Invalidation (TLI) metrics LocksBrokenAsBreaker and LocksBrokenAsVictim in the query_metrics_one_minute system view. The changes include:

  • Creation of a dedicated test file with a helper class for TLI testing scenarios
  • Five new test cases covering different lock invalidation scenarios (same key, different keys, multiple keys, cross-tables, and edge cases like InvisibleRowSkips and InconsistentResult)
  • Enhanced lock statistics tracking in session and write actors
  • Removal of the original basic test in favor of more comprehensive coverage

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
ydb/core/sys_view/ut_tli.cpp New test file with comprehensive TLI test scenarios using a helper class to verify lock break metrics
ydb/core/sys_view/ut_kqp.cpp Removed the original QueryMetricsLocksBroken test that is replaced by more comprehensive tests
ydb/core/sys_view/ut/ya.make Added the new test file to the build configuration
ydb/core/kqp/session_actor/kqp_session_actor.cpp Added victim lock tracking when transactions are aborted due to broken locks in two error paths
ydb/core/kqp/runtime/kqp_write_actor.cpp Enhanced lock statistics collection in two error handling paths (STATUS_LOCKS_BROKEN and STATUS_CONSTRAINT_VIOLATION)
ydb/core/kqp/executer_actor/kqp_executer_stats.cpp Added lock statistics extraction from task extra stats

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

2026-01-07 07:36:32 UTC Pre-commit check linux-x86_64-release-asan for cc79acc has started.
2026-01-07 07:37:31 UTC Artifacts will be uploaded here
2026-01-07 07:39:30 UTC ya make is running...
🟡 2026-01-07 08:48:21 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13769 13681 0 66 7 15

🟢 2026-01-07 08:48:30 UTC Build successful.
🟢 2026-01-07 08:49:17 UTC ydbd size 3.8 GiB changed* by +6.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: bb5ce3e merge: cc79acc diff diff %
ydbd size 4 105 507 000 Bytes 4 105 513 256 Bytes +6.1 KiB +0.000%
ydbd stripped size 1 535 800 144 Bytes 1 535 805 008 Bytes +4.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

@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 7, 2026
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 7, 2026
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 7, 2026
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 7, 2026
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 7, 2026
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 7, 2026
@azevaykin azevaykin requested a review from snaury January 7, 2026 07:39
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

2026-01-07 07:39:23 UTC Pre-commit check linux-x86_64-relwithdebinfo for cc79acc has started.
2026-01-07 07:39:39 UTC Artifacts will be uploaded here
2026-01-07 07:41:53 UTC ya make is running...
🟡 2026-01-07 09:29:05 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
43079 39879 0 3 3142 55

2026-01-07 09:29:23 UTC ya make is running... (failed tests rerun, try 2)
🟢 2026-01-07 09:39:07 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
621 (only retried tests) 609 0 0 0 12

🟢 2026-01-07 09:39:14 UTC Build successful.
🟢 2026-01-07 09:39:39 UTC ydbd size 2.3 GiB changed* by +1.5 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: bb5ce3e merge: cc79acc diff diff %
ydbd size 2 496 546 248 Bytes 2 496 547 816 Bytes +1.5 KiB +0.000%
ydbd stripped size 530 782 560 Bytes 530 782 880 Bytes +320 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

@azevaykin azevaykin merged commit bea0709 into ydb-platform:main Jan 12, 2026
9 checks passed
@azevaykin azevaykin deleted the MissedTliVictim branch January 12, 2026 08:26
@ydbot
Copy link
Collaborator

ydbot commented Jan 12, 2026

Backport

To backport this PR, click the button next to the target branch and then click "Run workflow" in the Run Actions UI.

Branch Run
stable-25-3, stable-25-3-1, stable-25-4 ▶  Backport
stable-25-4 ▶  Backport

▶  Backport manual

Hor911 added a commit to Hor911/ydb that referenced this pull request Jan 12, 2026
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