Skip to content

ct/l1/metastore: expose LSM probe metrics#31009

Open
andrwng wants to merge 1 commit into
redpanda-data:devfrom
andrwng:lsm-probe
Open

ct/l1/metastore: expose LSM probe metrics#31009
andrwng wants to merge 1 commit into
redpanda-data:devfrom
andrwng:lsm-probe

Conversation

@andrwng

@andrwng andrwng commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The lsm::probe owned by each metastore_partition's replicated_database tracks a bunch of things already (hit rates, latencies, throttling, etc) but didn't register any Seastar metrics.

This commit wraps them in a new probe that is labeled by metastore_partition.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v26.1.x
  • v25.3.x
  • v25.2.x

Release Notes

  • None

The lsm::probe owned by each metastore_partition's replicated_database
tracks a bunch of things already (hit rates, latencies, throttling, etc)
but didn't register any Seastar metrics.

This commit wraps them in a new probe that is labeled by
metastore_partition.
Copilot AI review requested due to automatic review settings July 3, 2026 01:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Seastar metric exposure for the existing LSM lsm::probe used by each L1 metastore partition’s replicated_database, enabling per-metastore-partition observability of cache behavior, write throttling, and compaction/flush latencies.

Changes:

  • Introduces metastore_lsm_probe, a per-metastore-partition wrapper that registers lsm::probe counters/histograms as Seastar metrics.
  • Wires the new probe into replicated_database::open() via lsm::options.probe and stores it for lifetime management.
  • Eagerly deregisters the metric group during replicated_database::close() to avoid registration conflicts across leadership churn.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/v/cloud_topics/level_one/metastore/lsm/replicated_db.h Stores a per-DB metastore_lsm_probe alongside the LSM database instance.
src/v/cloud_topics/level_one/metastore/lsm/replicated_db.cc Creates the probe before DB open, passes it into lsm::options, and deregisters metrics on close.
src/v/cloud_topics/level_one/metastore/lsm/metastore_lsm_probe.h Declares the probe wrapper API and metric deregistration hook.
src/v/cloud_topics/level_one/metastore/lsm/metastore_lsm_probe.cc Implements metric registration for key LSM counters and latencies with metastore_partition labeling.
src/v/cloud_topics/level_one/metastore/lsm/BUILD Adds a new Bazel library target and links it into the replicated DB build.

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

CI test results

test results on build#86691
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FLAKY(PASS) ClusterQuotaPartitionMutationTest test_partition_throttle_mechanism null integration https://buildkite.com/redpanda/redpanda/builds/86691#019f25a4-377d-465b-a178-d773a0a11be8 10/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.0000, p0=1.0000, reject_threshold=0.0100. adj_baseline=0.1000, p1=0.3487, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ClusterQuotaPartitionMutationTest&test_method=test_partition_throttle_mechanism
FLAKY(PASS) NodeWiseRecoveryTest test_node_wise_recovery {"dead_node_count": 2} integration https://buildkite.com/redpanda/redpanda/builds/86691#019f25a4-2276-486e-ba64-ba80da0d08e0 10/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.0234, p0=1.0000, reject_threshold=0.0100. adj_baseline=0.1000, p1=0.3487, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=NodeWiseRecoveryTest&test_method=test_node_wise_recovery

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.

3 participants