Browse Source

Fix cutoffTimeAgo in findMissingChunksInFiler (#5132)

pull/5133/head
Seyed Mahdi Sadegh Shobeiri 1 year ago
committed by GitHub
parent
commit
54ba2c8868
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      weed/shell/command_volume_fsck.go

5
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)
}

Loading…
Cancel
Save