Skip to content

stats: remove deprecated ScopeStatsLimitSettings#44211

Closed
ebm wants to merge 1 commit intoenvoyproxy:mainfrom
ebm:remove-scope-stats-limit-settings
Closed

stats: remove deprecated ScopeStatsLimitSettings#44211
ebm wants to merge 1 commit intoenvoyproxy:mainfrom
ebm:remove-scope-stats-limit-settings

Conversation

@ebm
Copy link
Copy Markdown

@ebm ebm commented Apr 1, 2026

Commit Message: stats: remove deprecated ScopeStatsLimitSettings

Additional Description: ScopeStatsLimitSettings limited the number of stats each scope could create. This was necessary when stats lived in shared memory, to prevent one scope from hogging the shared space. Stats now allocate from the heap, so these limits are unnecessary. ScopeStatsLimitSettings has been deprecated since then, leaving the struct as dead code.

Risk Level: Low

Testing: Removed tests that validated limit stats behavior. Changed tests that referenced ScopeStatsLimitSettings. All existing tests pass.

Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

ScopeStatsLimitSettings limited the number of stats each scope could create. This was necessary when stats lived in shared memory, to prevent one scope from hogging the shared space. Stats now allocate from the heap, so these limits are unnecessary. ScopeStatsLimitSettings has been deprecated since then, leaving the struct as dead code.

Signed-off-by: Ethan Marantz <ebmarantz@gmail.com>
@repokitteh-read-only
Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #44211 was opened by ebm.

see: more, trace.

@ebm ebm requested a deployment to external-contributors April 1, 2026 20:43 — with GitHub Actions Waiting
@jmarantz
Copy link
Copy Markdown
Contributor

jmarantz commented Apr 1, 2026

Note: this is a fix for #44162

Copy link
Copy Markdown
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

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

this looks close to perfect assuming it passes CI.

static_assert(std::is_same_v<StatType, TextReadout>, "Unexpected StatType");
}
// Limits don't need to be checked when creating stats because each scope's stats do not
// live in shared memory.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can just drop this comment

Copy link
Copy Markdown
Member

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

I think this code was just added in January, and is going to be used in #43625

cc @TAOXUY and @wbpcode and @kyessenov

@kyessenov
Copy link
Copy Markdown
Contributor

Yeah, this is a work-in-progress. Is there an issue that this is solving?

@jmarantz
Copy link
Copy Markdown
Contributor

jmarantz commented Apr 1, 2026

Oh this is my bad. I thought this was a leftover remnant of the old shared-memory-limited stats. I didn't realize it was for future use. @ebm let's find a different thing but at least you have the process sorted out.

@ebm ebm closed this Apr 6, 2026
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.

4 participants