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

commonParity should pick readable FileInfo #17032

Merged
merged 2 commits into from Apr 14, 2023

Conversation

krisis
Copy link
Member

@krisis krisis commented Apr 14, 2023

Description

commonParity picks parity of a maximally occurring FileInfo. In cases where two FileInfo candidates occur, we should pick the one which has read quorum.

Motivation and Context

commonParity in its current form would pick one or the other FileInfo randomly since it uses a map to calculate occurrence, which doesn't have a fixed ordering of keys.

How to test this PR?

Unit test

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)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

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

LGTM

@harshavardhana harshavardhana merged commit f92450d into minio:master Apr 14, 2023
16 checks passed
vadmeste pushed a commit to vadmeste/minio that referenced this pull request Apr 18, 2023
@bh4t bh4t added the bugfix label May 23, 2023
vadmeste pushed a commit to vadmeste/minio that referenced this pull request Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants