feat: add BucketLifeTimeILM to ScannerMetrics#583
Open
krisis wants to merge 3 commits into
Open
Conversation
24dba53 to
cb094f8
Compare
klauspost
reviewed
Apr 28, 2026
| package estream | ||
|
|
||
| //go:generate stringer -type=blockID -trimprefix=block | ||
| //go:generate go tool stringer -type=blockID -trimprefix=block |
Contributor
There was a problem hiding this comment.
Oh. you can do that. Neat.
klauspost
reviewed
Apr 28, 2026
Comment on lines
+457
to
+460
| // Number of accumulated ILM operations by type since server start, per bucket. | ||
| // Keyed by bucket name, then by action name. Only populated when a specific | ||
| // bucket is requested; nil otherwise. | ||
| BucketLifeTimeILM map[string]map[string]uint64 `json:"bucket_ilm_ops,omitempty"` |
Contributor
There was a problem hiding this comment.
OK, so you are returning for a specific bucket. You need to add the bucket name in the params. Should be fairly trivial.
Make it a pointer struct with the bucket name and fields, so we can add more without having to add individual fields here.
added 2 commits
May 13, 2026 11:53
Add BucketLifeTimeILM map[string]map[string]uint64 to ScannerMetrics to carry per-bucket ILM action counts from nodes to the console fan-out aggregation path. Gated on opts.bucket in the caller so the payload does not grow with total bucket count on unconstrained queries. Update Merge() to sum action counts per bucket across nodes. Regenerate msgp serialisation code. Add table-driven tests covering same-bucket summation, multi-bucket merges, and nil-safety on both sides.
Replace bare `stringer` invocations with `go tool stringer` so that go generate always uses the version pinned via the tool directive in go.mod (golang.org/x/tools v0.37.0) rather than whatever stringer binary happens to be on PATH.
bd82c68 to
79f35f5
Compare
Member
Author
|
@klauspost thanks for your advance review. I've addressed your comments. PTAL. |
79f35f5 to
e4a2d3a
Compare
Change ScannerMetrics.BucketLifeTimeILM from map[string]map[string]uint64 to map[string]*BucketILMStats so future per-bucket scanner fields can be added without growing the map signature. BucketILMStats carries Bucket and ActionCounters, with a nil-safe Merge that adopts the Bucket from either side. JSON and msgp tags use snake_case field names. The msgp generator emits encode/decode methods on the new type.
e4a2d3a to
00715e2
Compare
klauspost
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
SDK consumers can now read per-bucket ILM action counters from
ScannerMetricsin addition to the existing cluster-wide counters.
Motivation and Context
Prerequisite for miniohq/eos#4526. The eos side gates population on a bucket
parameter, so cluster-wide queries do not fan out the payload by bucket count.
How to test this PR?
Types of changes