mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid divided by zero
This commit is contained in:
parent
a0c6db361c
commit
ebf320ec22
|
@ -471,6 +471,9 @@ func (s *Store) GetVolumeSizeLimit() uint64 {
|
|||
|
||||
func (s *Store) MaybeAdjustVolumeMax() (hasChanges bool) {
|
||||
volumeSizeLimit := s.GetVolumeSizeLimit()
|
||||
if volumeSizeLimit == 0 {
|
||||
return
|
||||
}
|
||||
for _, diskLocation := range s.Locations {
|
||||
if diskLocation.OriginalMaxVolumeCount == 0 {
|
||||
currentMaxVolumeCount := diskLocation.MaxVolumeCount
|
||||
|
|
Loading…
Reference in a new issue