Skip to content

Commit

Permalink
fix(layer): metric splitting, span rename (#5902)
Browse files Browse the repository at this point in the history
Per [feedback], split the Layer metrics, also finally account for lost
and [re-submitted feedback] on `layer_gc` by renaming it to
`layer_delete`, `Layer::garbage_collect_on_drop` renamed to
`Layer::delete_on_drop`. References to "gc" dropped from metric names
and elsewhere.

Also fixes how the cancellations were tracked: there was one rare
counter. Now there is a top level metric for cancelled inits, and the
rare "download failed but failed to communicate" counter is kept.

Fixes: #6027

[feedback]: #5809 (review)
[re-submitted feedback]: #5108 (comment)
  • Loading branch information
koivunej committed Dec 7, 2023
1 parent 10c77cb commit 52718bb
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 133 deletions.
2 changes: 2 additions & 0 deletions pageserver/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2094,6 +2094,8 @@ pub fn preinitialize_metrics() {
// Tenant manager stats
Lazy::force(&TENANT_MANAGER);

Lazy::force(&crate::tenant::storage_layer::layer::LAYER_IMPL_METRICS);

// countervecs
[&BACKGROUND_LOOP_PERIOD_OVERRUN_COUNT]
.into_iter()
Expand Down
2 changes: 1 addition & 1 deletion pageserver/src/tenant/storage_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub mod delta_layer;
mod filename;
pub mod image_layer;
mod inmemory_layer;
mod layer;
pub(crate) mod layer;
mod layer_desc;

use crate::context::{AccessStatsBehavior, RequestContext};
Expand Down
Loading

1 comment on commit 52718bb

@github-actions
Copy link

Choose a reason for hiding this comment

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

2528 tests run: 2425 passed, 0 failed, 103 skipped (full report)


Flaky tests (2)

Postgres 16

  • test_statvfs_pressure_usage: debug

Postgres 14

Code coverage (full report)

  • functions: 54.6% (9340 of 17108 functions)
  • lines: 82.2% (54183 of 65917 lines)

The comment gets automatically updated with the latest test results
52718bb at 2023-12-07T10:39:55.350Z :recycle:

Please sign in to comment.