Skip to content

Conversation

@nshestakov
Copy link
Collaborator

@nshestakov nshestakov commented Nov 21, 2025

Changelog entry

...

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

Copilot AI review requested due to automatic review settings November 21, 2025 12:56
@nshestakov nshestakov requested a review from a team as a code owner November 21, 2025 12:56
@nshestakov nshestakov requested a review from nerhneiro November 21, 2025 12:56
@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 12:57:00 UTC Pre-commit check linux-x86_64-relwithdebinfo for 20c1199 has started.
2025-11-21 12:57:40 UTC Artifacts will be uploaded here
2025-11-21 12:59:42 UTC ya make is running...
2025-11-21 13:26:16 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

🟢 2025-11-24 06:32:02 UTC The validation of the Pull Request description is successful.

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 12:59:56 UTC Pre-commit check linux-x86_64-release-asan for 20c1199 has started.
2025-11-21 13:00:14 UTC Artifacts will be uploaded here
2025-11-21 13:02:22 UTC ya make is running...
2025-11-21 13:26:16 UTC Check cancelled

Copilot finished reviewing on behalf of nshestakov November 21, 2025 13:00
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 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 Baseline field from TPartitionInfo and 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.

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 13:27:40 UTC Pre-commit check linux-x86_64-release-asan for 91ce317 has started.
2025-11-21 13:27:58 UTC Artifacts will be uploaded here
2025-11-21 13:30:01 UTC ya make is running...
🟡 2025-11-21 15:05:40 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?
13596 13520 0 54 7 15

🟢 2025-11-21 15:05:50 UTC Build successful.
🟢 2025-11-21 15:06:17 UTC ydbd size 3.8 GiB changed* by +8.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 3b818c9 merge: 91ce317 diff diff %
ydbd size 4 109 071 536 Bytes 4 109 079 856 Bytes +8.1 KiB +0.000%
ydbd stripped size 1 527 317 648 Bytes 1 527 321 808 Bytes +4.1 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

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 13:28:06 UTC Pre-commit check linux-x86_64-relwithdebinfo for 91ce317 has started.
2025-11-21 13:28:24 UTC Artifacts will be uploaded here
2025-11-21 13:30:34 UTC ya make is running...
🟡 2025-11-21 15:28:01 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40555 37666 0 3 2846 40

2025-11-21 15:28:14 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-11-21 15:38:45 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
87 (only retried tests) 72 0 0 0 15

🟢 2025-11-21 15:38:52 UTC Build successful.
🟢 2025-11-21 15:39:11 UTC ydbd size 2.3 GiB changed* by -312 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 3b818c9 merge: 91ce317 diff diff %
ydbd size 2 454 546 808 Bytes 2 454 546 496 Bytes -312 Bytes -0.000%
ydbd stripped size 523 090 072 Bytes 523 090 072 Bytes 0 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

alexnick88
alexnick88 previously approved these changes Nov 21, 2025
@nshestakov nshestakov changed the title WIP Fixed an error in calculating metrics in the PQ tablet Nov 24, 2025
@nshestakov nshestakov requested a review from Copilot November 24, 2025 06:17
@github-actions
Copy link

github-actions bot commented Nov 24, 2025

2025-11-24 06:19:46 UTC Pre-commit check linux-x86_64-release-asan for 6daa081 has started.
2025-11-24 06:20:33 UTC Artifacts will be uploaded here
2025-11-24 06:22:44 UTC ya make is running...
🔴 2025-11-24 06:34:25 UTC Build failed, see the logs. Also see fail summary

Copilot finished reviewing on behalf of nshestakov November 24, 2025 06:20
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

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.

alexnick88
alexnick88 previously approved these changes Nov 24, 2025
@github-actions
Copy link

github-actions bot commented Nov 24, 2025

2025-11-24 06:43:58 UTC Pre-commit check linux-x86_64-release-asan for 02c976c has started.
2025-11-24 06:44:14 UTC Artifacts will be uploaded here
2025-11-24 06:46:26 UTC ya make is running...
🟡 2025-11-24 08:32:25 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?
13602 13403 0 161 23 15

🟢 2025-11-24 08:32:35 UTC Build successful.
🟢 2025-11-24 08:33:00 UTC ydbd size 3.8 GiB changed* by -4.1 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 8bf4163 merge: 02c976c diff diff %
ydbd size 4 110 674 264 Bytes 4 110 670 104 Bytes -4.1 KiB -0.000%
ydbd stripped size 1 527 863 856 Bytes 1 527 861 744 Bytes -2.1 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

@github-actions
Copy link

github-actions bot commented Nov 24, 2025

2025-11-24 07:03:36 UTC Pre-commit check linux-x86_64-relwithdebinfo for 02c976c has started.
2025-11-24 07:03:43 UTC Artifacts will be uploaded here
2025-11-24 07:05:18 UTC ya make is running...
🟡 2025-11-24 09:23:18 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40568 37542 0 2 2995 29

2025-11-24 09:23:32 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-11-24 09:34:45 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
291 (only retried tests) 199 0 0 76 16

🟢 2025-11-24 09:34:53 UTC Build successful.
🟡 2025-11-24 09:35:15 UTC ydbd size 2.3 GiB changed* by +139.1 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 5230310 merge: 02c976c diff diff %
ydbd size 2 455 477 888 Bytes 2 455 620 280 Bytes +139.1 KiB +0.006%
ydbd stripped size 523 286 616 Bytes 523 303 896 Bytes +16.9 KiB +0.003%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@nshestakov nshestakov enabled auto-merge (squash) November 24, 2025 07:50
@nshestakov nshestakov merged commit 05ce178 into ydb-platform:main Nov 24, 2025
9 checks passed
@nshestakov nshestakov deleted the PQ-counters branch November 24, 2025 10:12
nshestakov added a commit to nshestakov/ydb that referenced this pull request Nov 24, 2025
nshestakov added a commit to nshestakov/ydb that referenced this pull request Nov 24, 2025
nshestakov added a commit to nshestakov/ydb that referenced this pull request Nov 26, 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