diff options
| author | Konstantin Lebedev <lebedev_k@tochka.com> | 2021-03-23 21:42:35 +0500 |
|---|---|---|
| committer | Konstantin Lebedev <lebedev_k@tochka.com> | 2021-03-23 21:42:35 +0500 |
| commit | 40a9e88c0710dffc780602e55cf14071c384276d (patch) | |
| tree | 05ee34198087f06b380d968b82dcaeb14d15e175 | |
| parent | d21a5bf5d0c4b0db1951058934701c142fbd7acc (diff) | |
| download | seaweedfs-40a9e88c0710dffc780602e55cf14071c384276d.tar.xz seaweedfs-40a9e88c0710dffc780602e55cf14071c384276d.zip | |
rename var
| -rw-r--r-- | weed/shell/command_volume_check_disk.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/shell/command_volume_check_disk.go b/weed/shell/command_volume_check_disk.go index b53229dbd..dc3b8ca06 100644 --- a/weed/shell/command_volume_check_disk.go +++ b/weed/shell/command_volume_check_disk.go @@ -131,11 +131,11 @@ func (c *commandVolumeCheckDisk) doVolumeCheckDisk(subtrahend, minuend *needle_m }) fmt.Fprintf(writer, "volume %d %s has %d entries, %s missed %d entries\n", source.info.Id, source.location.dataNode.Id, counter, target.location.dataNode.Id, len(missingNeedles)) - missingNeedlesPercent := float64(len(missingNeedles)) / float64(counter) - if missingNeedlesPercent > missingKeysThreshold { + missingNeedlesFraction := float64(len(missingNeedles)) / float64(counter) + if missingNeedlesFraction > missingKeysThreshold { return fmt.Errorf( "failed to start repair volume %d, percentage of missing keys is greater than the threshold: %.2f > %.2f", - source.info.Id, missingNeedlesPercent, missingKeysThreshold) + source.info.Id, missingNeedlesFraction, missingKeysThreshold) } for _, needleValue := range missingNeedles { |
