Skip to content

comments

d50f726
Select commit
Loading
Failed to load commit list.
Merged

Stats: Remove the pure interface Stats::Allocator and rename the sole implementation from Stats::AllocatorImpl to Stats::Allocator #43968

comments
d50f726
Select commit
Loading
Failed to load commit list.
CI (Envoy) / Mobile/Python skipped Mar 16, 2026 in 0s

Check was skipped

This check was not triggered in this CI run

Details

Request (pr/43968/main@d50f726)

jmarantz @jmarantz d50f726 #43968 merge main@7f56aad

Stats: Remove the pure interface Stats::Allocator and rename the sole implementation from Stats::AllocatorImpl to Stats::Allocator

Commit Message: Removes no-longer-needed Stats::Allocator interface, and renames the sole implementation, Stats::AllocatorImpl to Stats::Allocator.

A long time ago, all Envoy stats were stored in a large shared memory block, significantly limiting how many you could get, and the lengths of their names. This facilitated keeping stat continuity across parent/child hot-restart. The fixed shared-mem block size was very limiting and a bit inefficient, so an alternative mechanism of keeping stats on the heap was added for when hot-restart was not needed. To switch between them, we used the Allocator interface, and kept two implementations of that.

Then we removed the shared-memory version in favor of using message passing to update counters from parent to child during hot restart.

Now it's time to remove that interface; it's making it a bit harder to reason about guaranteeing that stats users don't call the allocator directly; it's really an implementation detail of the stats system. So this is a pure refactor (no functional change) which can help that, and make it easier to reason about the safety of #43958 .

As removing headers and class names can be a breaking change, temporary forwarding headers are left behind, temporarily; out-of-repo referencess should be changed by June.

Additional Description:
Risk Level: low -- pure. refactor
Testing: CI
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features:

Environment

Request variables

Key Value
ref ff131c6
sha d50f726
pr 43968
base-sha 7f56aad
actor jmarantz @jmarantz
message Stats: Remove the pure interface Stats::Allocator and rename the sole implementation from Stats::AllocatorImpl to Stats::Allocator...
started 1773673591.946021
target-branch main
trusted false
Build image

Container image/s (as used in this CI run)

Key Value
default docker.io/envoyproxy/envoy-build:86873047235e9b8232df989a5999b9bebf9db69c
mobile docker.io/envoyproxy/envoy-build:mobile-86873047235e9b8232df989a5999b9bebf9db69c
Version

Envoy version (as used in this CI run)

Key Value
major 1
minor 38
patch 0
dev true