Seyed Mahdi Sadegh Shobeiri
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
3 deletions
-
weed/shell/command_volume_fsck.go
|
|
@ -136,7 +136,7 @@ func (c *commandVolumeFsck) Do(args []string, commandEnv *CommandEnv, writer io. |
|
|
|
return fmt.Errorf("read filer buckets path: %v", err) |
|
|
|
} |
|
|
|
|
|
|
|
collectCutoffFromAtNs := time.Now().UnixNano() |
|
|
|
collectCutoffFromAtNs := time.Now().Add(-*cutoffTimeAgo).UnixNano() |
|
|
|
// collect each volume file ids
|
|
|
|
for dataNodeId, volumeIdToVInfo := range dataNodeVolumeIdToVInfo { |
|
|
|
for volumeId, vinfo := range volumeIdToVInfo { |
|
|
@ -150,8 +150,7 @@ func (c *commandVolumeFsck) Do(args []string, commandEnv *CommandEnv, writer io. |
|
|
|
delete(volumeIdToVInfo, volumeId) |
|
|
|
continue |
|
|
|
} |
|
|
|
cutoffFrom := time.Now().Add(-*cutoffTimeAgo).UnixNano() |
|
|
|
err = c.collectOneVolumeFileIds(dataNodeId, volumeId, vinfo, uint64(cutoffFrom)) |
|
|
|
err = c.collectOneVolumeFileIds(dataNodeId, volumeId, vinfo, uint64(collectCutoffFromAtNs)) |
|
|
|
if err != nil { |
|
|
|
return fmt.Errorf("failed to collect file ids from volume %d on %s: %v", volumeId, vinfo.server, err) |
|
|
|
} |
|
|
|