Skip to content

[Enhancement] Expose the actual tablet version-limit counter (_approximate_num_rowsets) as a Prometheus metric #67458

Description

@jayakasadev

Search before asking

  • I had searched in the issues and found no similar issues.

Description

Writes to a tablet are rejected once its version count passes max_tablet_version_num, and it fails with TOO_MANY_VERSION (E235). The check reads a counter called _approximate_num_rowsets.
The only related metric, tablet_version_num_distribution, reads a different counter that updates less frequently and skips tablets that are currently being written to. This hides potential issues until there is a failure.
There's no Prometheus metric for _approximate_num_rowsets. The only way to read it is via admin HTTP GET to /api/hotspot/tablet?metrics=num_rowsets.

Solution

  1. Add a metric fed from _approximate_num_rowsets using the same pattern as the existing histogram in doris_metrics.{h,cpp}.
  2. Report it for all tablets, including ones under active load

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions