Skip to content

logical, txnapply: add in flight txn metrics#169672

Draft
DarrylWong wants to merge 2 commits intocockroachdb:masterfrom
DarrylWong:ldr-txn-metrics
Draft

logical, txnapply: add in flight txn metrics#169672
DarrylWong wants to merge 2 commits intocockroachdb:masterfrom
DarrylWong:ldr-txn-metrics

Conversation

@DarrylWong
Copy link
Copy Markdown
Contributor

This change adds metrics to see in flight transactions in the applier pipeline. The number is broken down into blocked and ready txns.

The former represents the number of txns that are blocked on either another txn or the event horizon. The latter represents the number of txns that are ready to be commited but haven't yet, i.e. on the ready buffer.

Fixes: None
Release note: TODO
Epic: https://cockroachlabs.atlassian.net/browse/CRDB-61283

@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented May 4, 2026

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@DarrylWong DarrylWong force-pushed the ldr-txn-metrics branch 2 times, most recently from 16f0a35 to 2bb21ce Compare May 4, 2026 22:47
We want to start adding metrics to ldr txn mode, including
the existing metrics. Txn mode is implemented as individual
sub systems which will cause a dependency cycle if we
attempt to import the original logical package. This change
extracts the existing metrics struct to its own package.

Release note: None
@DarrylWong DarrylWong force-pushed the ldr-txn-metrics branch 3 times, most recently from 9199659 to f24d6dc Compare May 4, 2026 23:24
This change adds metrics to see in flight transactions in the
applier pipeline. The number is broken down into blocked and
ready txns.

The former represents the number of txns that are blocked on
either another txn or the event horizon. The latter represents
the number of txns that are ready to be commited but haven't
yet, i.e. on the ready buffer.

Both gauges live on the parent metrics.Metrics struct as
TxnApplierBlockedTxns and TxnApplierReadyTxns. The applier
takes a *metrics.Metrics pointer at construction and updates
the gauges directly.

Release note: None
@DarrylWong DarrylWong changed the title logical: add txn apply in flight txn metrics logical, txn apply: add in flight txn metrics May 5, 2026
@DarrylWong DarrylWong changed the title logical, txn apply: add in flight txn metrics logical, txnapply: add in flight txn metrics May 5, 2026
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