Browse Source

[volume.check.disk] skip errors and check next volumes

fix https://github.com/chrislusf/seaweedfs/issues/2129
pull/2198/head
Chris Lu 4 years ago
parent
commit
4be5b4ff5c
  1. 15
      weed/shell/command_volume_check_disk.go

15
weed/shell/command_volume_check_disk.go

@ -89,6 +89,17 @@ func (c *commandVolumeCheckDisk) Do(args []string, commandEnv *CommandEnv, write
continue continue
} }
if err := c.syncTwoReplicas(aDB, bDB, a, verbose, writer, b, err, applyChanges, nonRepairThreshold); err != nil {
fmt.Fprintf(writer, "snyc volume %d on %s and %s: %v\n", a.info.Id, a.location.dataNode.Id, b.location.dataNode.Id, err)
}
replicas = replicas[1:]
}
}
return nil
}
func (c *commandVolumeCheckDisk) syncTwoReplicas(aDB *needle_map.MemDb, bDB *needle_map.MemDb, a *VolumeReplica, verbose *bool, writer io.Writer, b *VolumeReplica, err error, applyChanges *bool, nonRepairThreshold *float64) error {
aHasChanges, bHasChanges := true, true aHasChanges, bHasChanges := true, true
for aHasChanges || bHasChanges { for aHasChanges || bHasChanges {
// reset index db // reset index db
@ -112,10 +123,6 @@ func (c *commandVolumeCheckDisk) Do(args []string, commandEnv *CommandEnv, write
return err return err
} }
} }
replicas = replicas[1:]
}
}
return nil return nil
} }

Loading…
Cancel
Save