Skip to content

branch-4.0: [Enhancement](Recycler) Add bvar metrics for operation logs #60520#61879

Closed
Yukang-Lian wants to merge 1 commit intoapache:branch-4.0from
Yukang-Lian:pick-60520-branch-4.0
Closed

branch-4.0: [Enhancement](Recycler) Add bvar metrics for operation logs #60520#61879
Yukang-Lian wants to merge 1 commit intoapache:branch-4.0from
Yukang-Lian:pick-60520-branch-4.0

Conversation

@Yukang-Lian
Copy link
Copy Markdown
Collaborator

Summary

Cherry-pick #60520 to branch-4.0.

  • Add dedicated bvar metrics for the recycle_operation_logs path
  • Introduce OplogRecycleStats to track per-round recycling statistics
  • Add scan_and_statistics_operation_logs() for pre-recycling statistics
  • All new statistics are gated behind the enable_recycler_stats_metrics config flag

…0520)

- Add dedicated bvar metrics for the recycle_operation_logs path, which
previously had no observability through the monitoring system
- Introduce OplogRecycleStats to track per-round recycling statistics
including skipped-by-snapshot count, earliest recyclable version,
failure count, and generated recycle key counts
(partition/index/rowset/txn)
- Add scan_and_statistics_operation_logs() to collect pre-recycling
statistics via RecyclerMetricsContext, consistent with existing
scan_and_statistics_* functions
- Use a PendingCounts pattern in OperationLogRecycler to avoid inflating
committed metrics on transaction failure — local counts are only merged
into OplogRecycleStats atomics after successful
commit()
- All new statistics are gated behind the enable_recycler_stats_metrics
config flag
@Yukang-Lian Yukang-Lian requested a review from yiguolei as a code owner March 30, 2026 08:23
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@Yukang-Lian
Copy link
Copy Markdown
Collaborator Author

Superseded by #61920 (combined cherry-pick PR for branch-4.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants