Skip to content

stats: Cleanup rejects on throw#6777

Merged
htuch merged 2 commits intoenvoyproxy:masterfrom
jmarantz:cleanup-rejects-on-throw
May 2, 2019
Merged

stats: Cleanup rejects on throw#6777
htuch merged 2 commits intoenvoyproxy:masterfrom
jmarantz:cleanup-rejects-on-throw

Conversation

@jmarantz
Copy link
Copy Markdown
Contributor

@jmarantz jmarantz commented May 2, 2019

Description: Some negative tests external to this codebase exercise config errors resulting in thrown exceptions during server construction, which takes an altered path to shutdown. Notably, any cleanups in post() callbacks may not be called. This was causing memory-leaks in unit-tests. This PR fixes that by keeping a copy of the rejected-stats set in "purgatory" so they can be removed on destruction from ThreadLocalStore if they don't get cleaned up by the post().
Risk Level: medium
Testing: //test/...
Docs Changes: n/a
Release Notes: n/a

jmarantz added 2 commits May 1, 2019 21:39
…ore.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz jmarantz requested a review from aunu53 May 2, 2019 03:52
@jmarantz jmarantz marked this pull request as ready for review May 2, 2019 11:33
@jmarantz jmarantz requested a review from htuch May 2, 2019 11:33
Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@htuch htuch merged commit ad49f81 into envoyproxy:master May 2, 2019
@jmarantz jmarantz deleted the cleanup-rejects-on-throw branch May 2, 2019 18:36
jeffpiazza-google pushed a commit to jeffpiazza-google/envoy that referenced this pull request May 3, 2019
Some negative tests external to this codebase exercise config errors resulting in thrown exceptions during server construction, which takes an altered path to shutdown. Notably, any cleanups in post() callbacks may not be called. This was causing memory-leaks in unit-tests. This PR fixes that by keeping a copy of the rejected-stats set in "purgatory" so they can be removed on destruction from ThreadLocalStore if they don't get cleaned up by the post().

Risk Level: medium
Testing: //test/...
Docs Changes: n/a
Release Notes: n/a

Signed-off-by: Joshua Marantz <jmarantz@google.com>

Signed-off-by: Jeff Piazza <jeffpiazza@google.com>
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