Skip to content

logical, txnapply: add in flight txn metrics#169672

Closed
DarrylWong wants to merge 2 commits into
cockroachdb:masterfrom
DarrylWong:ldr-txn-metrics
Closed

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

Conversation

@DarrylWong

@DarrylWong DarrylWong commented May 4, 2026

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: None
Epic: https://cockroachlabs.atlassian.net/browse/CRDB-61283

@trunk-io

trunk-io Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

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 6 times, most recently from f24d6dc to 2429994 Compare May 5, 2026 18:28
@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
@DarrylWong

Copy link
Copy Markdown
Contributor Author

I'll have a followup PR to start wiring up some of the existing metrics, but these are ones I wanted for constraint testing to validate that we are generating sufficient dependencies:

image

@blathers-crl

blathers-crl Bot commented May 6, 2026

Copy link
Copy Markdown

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@DarrylWong DarrylWong marked this pull request as ready for review May 6, 2026 15:53
@DarrylWong DarrylWong requested a review from a team as a code owner May 6, 2026 15:53
@DarrylWong DarrylWong requested review from rharding6373 and removed request for a team May 6, 2026 15:53
@rharding6373 rharding6373 requested review from KeithCh and removed request for rharding6373 May 6, 2026 23:51
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
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

Copy link
Copy Markdown
Contributor Author

There is review happening in #171191, closing this one out.

@DarrylWong DarrylWong closed this Jun 1, 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