Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consumption_metrics: fix periodicness behavior & reporting (#5625)
Before this PR, the ticker was running at default miss behavior `Delay`. For example, here is the startup output with 25k tenants: ``` 2023-10-19T09:57:21.682466Z INFO synthetic_size_worker: starting calculate_synthetic_size_worker 2023-10-19T10:50:44.678202Z WARN synthetic_size_worker: task iteration took longer than the configured period elapsed=3202.995707156s period=10m task=ConsumptionMetricsSyntheticSizeWorker 2023-10-19T10:52:17.408056Z WARN synthetic_size_worker: task iteration took longer than the configured period elapsed=2695.72556035s period=10m task=ConsumptionMetricsSyntheticSizeWorker ``` The first message's `elapsed` value is correct. It matches the delta between the log line timestamps. The second one is logged ca 1.5min after, though, but reports a much larger `elapsed` than 1.5min. This PR fixes the behavior by copying what `eviction_task.rs` does.
- Loading branch information
c6ca1d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2409 tests run: 2286 passed, 0 failed, 123 skipped (full report)
Flaky tests (1)
Postgres 16
test_crafted_wal_end[last_wal_record_crossing_segment]
: releaseCode coverage (full report)
functions
:53.0% (8471 of 15996 functions)
lines
:80.7% (49610 of 61437 lines)
c6ca1d7 at 2023-10-23T16:22:05.856Z :recycle: