Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

pageserver_io_operations_bytes_total not lifecycled correctly for secondaries #11156

Open
problame opened this issue Mar 10, 2025 · 0 comments · May be fixed by #11283
Open

pageserver_io_operations_bytes_total not lifecycled correctly for secondaries #11156

problame opened this issue Mar 10, 2025 · 0 comments · May be fixed by #11283
Assignees
Labels
a/observability Area: related to observability c/storage/pageserver Component: storage: pageserver t/bug Issue Type: Bug

Comments

@problame
Copy link
Contributor

Background

The pageserver_io_operations_bytes_total metric (STORAGE_IO_SIZE) is per-timeline.

Before

the tenant/shard/timeline ids were inferred from the path that was passed to VirtualFile::open. The first read/write operation on that VirtualFile would instantiate the metric via with_label_values.

This happens both for Attached and Secondary locations.

Attached locations properly lifecycle-manage the metric: during Timeline::shutdown, the metric gets removed.

#7202 avoids the with_label_values in the hot path but punts on fixing the problem described below.

Problem

Secondary locations don't lifecycle-manage the metric.

Thus, if a secondary location gets detached, the instantiated per-timeline metric remains in the registry causing

  • confusion
  • minimal memory usage

Solution

Somehow lifecycle-manage the metric.

Secondaries don't have infrastructure for this at the timeline-level, so, some generic infrastructure needs to be put in place first.

@problame problame added t/bug Issue Type: Bug c/storage/pageserver Component: storage: pageserver a/observability Area: related to observability labels Mar 10, 2025
@VladLazar VladLazar linked a pull request Mar 17, 2025 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
a/observability Area: related to observability c/storage/pageserver Component: storage: pageserver t/bug Issue Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants