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

Backport 1.5: Disable usage metrics on performance standby nodes. (#9966) #9967

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

mgritter
Copy link
Contributor

No description provided.

if c.expiration != nil {

// Emit on active node only
if c.expiration != nil && !c.perfStandby {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest c.PerfStandby() instead for locking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that some care is needed because c.stateLock can be held while acquiring c.metricsLock, so we shouldn't acquire them in the reverse order here.

@@ -54,6 +57,11 @@ func (c *Core) metricsLoop(stopCh chan struct{}) {
}
c.stateLock.RUnlock()
case <-identityCountTimer:
// Only emit on active node
if c.perfStandby {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

@ncabatoff ncabatoff changed the title Disable usage metrics on performance standby nodes. (#9966) Backport 1.5: Disable usage metrics on performance standby nodes. (#9966) Sep 18, 2020
@mgritter mgritter merged commit 0fa61ec into release/1.5.x Sep 22, 2020
@mgritter mgritter deleted the backport-pr-9966-1.5x branch September 22, 2020 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants