-
Notifications
You must be signed in to change notification settings - Fork 735
Fixed an error in calculating metrics in the PQ tablet #29321
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 refactors the tablet counter handling mechanism for partitions by switching from a baseline-diff approach to a reset-to-zero approach. Instead of maintaining baseline counters for each partition and calculating differences, the system now directly uses counter values and resets them to zero after each report.
Key Changes:
- Added
ResetToZero()method to tablet counter classes to enable resetting cumulative and percentile counters - Removed
Baselinefield fromTPartitionInfoand simplified its constructor - Changed counter aggregation logic to use direct counter values instead of computing diffs against baselines
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ydb/core/tablet/tablet_counters.h | Added Set() method and ResetToZero() implementations for counter array types |
| ydb/core/persqueue/pqtablet/pq_impl_types.h | Removed Baseline field and simplified TPartitionInfo constructor to no longer accept baseline parameter |
| ydb/core/persqueue/pqtablet/pq_impl.cpp | Removed baseline-based diff calculation and replaced with direct counter usage; changed to track ReservedBytes separately |
| ydb/core/persqueue/pqtablet/partition/partition.cpp | Added ResetToZero() calls after counter initialization and after sending counters to tablet |
| ydb/core/persqueue/pqtablet/partition/mirrorer/mirrorer.cpp | Added ResetToZero() calls after counter initialization and after sending counters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
⚪
🟢
*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 |
|
⚪ |
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
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
⚪
🟢
*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
...
Changelog category
Description for reviewers
...