Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(pageserver): add metrics for number of valid leases after each refresh #8147

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

yliang412
Copy link
Contributor

@yliang412 yliang412 commented Jun 24, 2024

Part of #7497, closes #8120.

Summary of changes

This PR adds a metric to track the number of valid leases after GCInfo gets refreshed each time.

Besides this metric, we should also track disk space and synthetic size (after #8071 is closed) to make sure leases are used properly.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

…efresh

Signed-off-by: Yuchen Liang <yuchen@neon.tech>
@yliang412 yliang412 requested a review from a team as a code owner June 24, 2024 18:57
Copy link
Member

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

Per-timeline metrics should be cleaned-up after the timeline gets detached. Please refer to other timeline metrics and copy-paste the cleanup code. e2e tests also need to be changed to include the name of this new metrics, but I forget which regress test needs to be changed. You can wait the CI run and see what to fix :)

Copy link

github-actions bot commented Jun 24, 2024

2922 tests run: 2805 passed, 0 failed, 117 skipped (full report)


Flaky tests (2)

Postgres 16

  • test_isolation[None]: debug

Postgres 14

Code coverage* (full report)

  • functions: 32.5% (6876 of 21137 functions)
  • lines: 50.2% (53658 of 106990 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
7c6b284 at 2024-06-25T15:37:17.629Z :recycle:

…er_detach

Signed-off-by: Yuchen Liang <yuchen@neon.tech>
@yliang412 yliang412 enabled auto-merge (squash) June 25, 2024 15:30
@yliang412 yliang412 merged commit 961fc0b into main Jun 25, 2024
57 checks passed
@yliang412 yliang412 deleted the yuchen/lsn-lease-metrics branch June 25, 2024 15:43
conradludgate pushed a commit that referenced this pull request Jun 27, 2024
…efresh (#8147)

Part of #7497, closes #8120.

## Summary of changes

This PR adds a metric to track the number of valid leases after `GCInfo`
gets refreshed each time.

Besides this metric, we should also track disk space and synthetic size
(after #8071 is closed) to make sure leases are used properly.

Signed-off-by: Yuchen Liang <yuchen@neon.tech>
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.

Use metrics to track lease usage
3 participants