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

fix "volume.fix.replication" move many replications only to one volumeServer #5522

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

kungf
Copy link
Contributor

@kungf kungf commented Apr 23, 2024

What problem are we solving?

After one volumeServer down, volume.fix.replication fix volume replications only to one volumeServer.
keepDataNodesSorted sorted dataNodes by float64(diskInfo.MaxVolumeCount-diskInfo.VolumeCount),but it only diskInfo.FreeVolumeCount-- after fixed one volume. So keepDataNodesSorted always gets the same result in fixing all under replicated volumes, this will make the first volumeServer full.

How are we solving the problem?

diskInfo.VolumeCount++ with diskInfo.FreeVolumeCount--

How is the PR tested?

  1. stop one volume server
  2. volume.fix.replication fix under replicated volume to different volumeServers.

Checks

  • I have added unit tests if possible.
  • I will add related wiki document changes and link to this PR after merging.

@chrislusf chrislusf merged commit 6e4b918 into seaweedfs:master Apr 23, 2024
5 of 6 checks passed
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

2 participants