Skip to content

Keep snapped stats in MetricSnapshotImpl.#18144

Merged
ggreenway merged 1 commit intoenvoyproxy:mainfrom
pradeepcrao:metric_snapshot2
Sep 20, 2021
Merged

Keep snapped stats in MetricSnapshotImpl.#18144
ggreenway merged 1 commit intoenvoyproxy:mainfrom
pradeepcrao:metric_snapshot2

Conversation

@pradeepcrao
Copy link
Copy Markdown
Contributor

@pradeepcrao pradeepcrao commented Sep 16, 2021

Signed-off-by: Pradeep Rao pcrao@google.com
Defensively keep RefCountPtrs to stats around during the flush, guarding against stat deletions on the worker thread. Stats allocated with ThreadLocalStore are always deleted on the main thread after being cleared from the TLS caches, so this is not a problem in practice, but it does make sense to hold onto a shared-ptr in the sink.

Note that this is a transient state -- in a future PR the intermediate vectors can be dropped and lambda functions can be used to process all the sinked stats.

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]

Signed-off-by: Pradeep Rao <pcrao@google.com>
@pradeepcrao
Copy link
Copy Markdown
Contributor Author

/assign jmarantz

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.

/assign-from @envoyproxy/senior-maintainers

@repokitteh-read-only
Copy link
Copy Markdown

@envoyproxy/senior-maintainers assignee is @ggreenway

🐱

Caused by: a #18144 (review) was submitted by @jmarantz.

see: more, trace.

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.

3 participants