Skip to content

stats: TLS-cache leaks stats when clusters are removed. #6306

@jmarantz

Description

@jmarantz

Whenever a cluster is removed from Envoy via xDS update, the ThreadLocalStore::Scope will be cleaned up, and the corresponding CentralCacheEntry objects will also be deleted.

However, there are also TlsCacheEntry objects for each thread, and those will continue to reference any stats that were created for clusters, and there does not appear to be any mechanism to reclaim those map entries or GC away the stat objects themselves, which are kept alive by a shared_ptr.

I believe a cleanup could be engineered by post()ing a GC request to each thread at the time the Scope is deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions