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

Protect part of emitMetrics from panic behavior during post-seal #10708

Merged
merged 4 commits into from
Jan 19, 2021

Conversation

HridoyRoy
Copy link
Contributor

No description provided.

// emitMetrics doesn't grab the statelock, so this code might run during or after the seal process.
// Therefore, we need to check if c.mounts is nil. If we do not, emitMetrics will panic if this is
// run after seal.
if c.mounts == nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be moved below, after grabbing the mountsLock.

@HridoyRoy HridoyRoy modified the milestones: 1.7, 1.6.3 Jan 15, 2021
@ncabatoff
Copy link
Collaborator

This should fix #10703.

@HridoyRoy
Copy link
Contributor Author

This PR will be backported to 1.6 as well.

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.

2 participants