mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 14:38:50 +08:00
fix volume balance bug
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
"os"
|
||||
"sort"
|
||||
"time"
|
||||
@@ -186,7 +187,7 @@ func balanceSelectedVolume(commandEnv *commandEnv, nodes []*Node, sortCandidates
|
||||
selectedVolumeCount += len(dn.selectedVolumes)
|
||||
}
|
||||
|
||||
idealSelectedVolumes := selectedVolumeCount / len(nodes)
|
||||
idealSelectedVolumes := int(math.Ceil(float64(selectedVolumeCount) / float64(len(nodes))))
|
||||
|
||||
hasMove := true
|
||||
|
||||
|
Reference in New Issue
Block a user