Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stats: fix merge during shutdown #3289

Merged

Conversation

ramaraochavali
Copy link
Contributor

@ramaraochavali ramaraochavali commented May 4, 2018

Signed-off-by: Rama rama.rao@salesforce.com

Description:

  • Move the ASSERT to inside shutting_down_ block
  • Allow the rest of the flush to continue during shutdown

Risk Level: Low
Testing: Automated
Docs Changes: NA
Release Notes: NA

Fixes #3287

Signed-off-by: Rama <rama.rao@salesforce.com>
Signed-off-by: Rama <rama.rao@salesforce.com>
@@ -109,6 +109,9 @@ void ThreadLocalStoreImpl::mergeHistograms(PostMergeCb merge_complete_cb) {
}
},
[this, merge_complete_cb]() -> void { mergeInternal(merge_complete_cb); });
} else {
// If server is shutting down, just call the callback to allow flush to continue.
merge_complete_cb();
Copy link
Member

Choose a reason for hiding this comment

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

Please add a test for this case.

Signed-off-by: Rama <rama.rao@salesforce.com>
@mattklein123 mattklein123 changed the title stats:fix merge during shutdown stats: fix merge during shutdown May 4, 2018
Copy link
Member

@mattklein123 mattklein123 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 for fixing this. @mrice32 @jmarantz any concerns?

Copy link
Member

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

LGTM

@ggreenway ggreenway merged commit 2b2c299 into envoyproxy:master May 4, 2018
@ramaraochavali ramaraochavali deleted the fix/flush_stats_shutdown branch May 8, 2018 13:04
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.

5 participants