-
Notifications
You must be signed in to change notification settings - Fork 747
Tests for LocksBrokenAsVictim and LocksBrokenAsBreaker metrics #31699
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
|
🟢 |
There was a problem hiding this 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.
2d6fb2e to
b39d5b2
Compare
b39d5b2 to
76da8fa
Compare
76da8fa to
f52d43d
Compare
|
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ ⚪ Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
More tests for
LocksBrokenAsBreaker,LocksBrokenAsVictimin sys_viewquery_metrics_one_minuteChangelog category
Description for reviewers
...