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

mrf: Avoid rare data race and more simplification #12791

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

vadmeste
Copy link
Member

Description

This change avoids a rare data race and simplify the function that
returns MRF last activity information.

Motivation and Context

WARNING: DATA RACE
Write at 0x0000077a0cf8 by main goroutine:
  github.com/minio/minio/cmd.initHealMRF()
      github.com/minio/minio/cmd/mrf.go:233 +0x1e9
  github.com/minio/minio/cmd.serverMain()
      github.com/minio/minio/cmd/server-main.go:532 +0xe44
  github.com/minio/cli.HandleAction()
      github.com/minio/cli@v1.22.0/app.go:500 +0x103
  github.com/minio/cli.Command.Run()
      github.com/minio/cli@v1.22.0/command.go:225 +0xdc5
  github.com/minio/cli.(*App).Run()
      github.com/minio/cli@v1.22.0/app.go:261 +0xab3
  github.com/minio/minio/cmd.Main()
      github.com/minio/minio/cmd/main.go:168 +0xa8
  main.main()
      github.com/minio/minio/main.go:30 +0x64
Previous read at 0x0000077a0cf8 by goroutine 121:
  [failed to restore the stack]

How to test this PR?

Hard to catch the race warning, a normal MRF testing will be good

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation updated
  • Unit tests added/updated

This change avoids a rare data race and simplify the function that
returns MRF last activity information.
@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-erasure.sh ✔️
mint-dist-erasure.sh ✔️
mint-zoned.sh ✔️
mint-gateway-nas.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
Deleting image on docker hub
Deleting image locally

@harshavardhana harshavardhana merged commit 39874b7 into minio:master Jul 26, 2021
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.

None yet

3 participants