mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Fix cutoffTimeAgo in findMissingChunksInFiler (#5132)
This commit is contained in:
parent
03c4b2e988
commit
54ba2c8868
|
@ -136,7 +136,7 @@ func (c *commandVolumeFsck) Do(args []string, commandEnv *CommandEnv, writer io.
|
||||||
return fmt.Errorf("read filer buckets path: %v", err)
|
return fmt.Errorf("read filer buckets path: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
collectCutoffFromAtNs := time.Now().UnixNano()
|
collectCutoffFromAtNs := time.Now().Add(-*cutoffTimeAgo).UnixNano()
|
||||||
// collect each volume file ids
|
// collect each volume file ids
|
||||||
for dataNodeId, volumeIdToVInfo := range dataNodeVolumeIdToVInfo {
|
for dataNodeId, volumeIdToVInfo := range dataNodeVolumeIdToVInfo {
|
||||||
for volumeId, vinfo := range volumeIdToVInfo {
|
for volumeId, vinfo := range volumeIdToVInfo {
|
||||||
|
@ -150,8 +150,7 @@ func (c *commandVolumeFsck) Do(args []string, commandEnv *CommandEnv, writer io.
|
||||||
delete(volumeIdToVInfo, volumeId)
|
delete(volumeIdToVInfo, volumeId)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
cutoffFrom := time.Now().Add(-*cutoffTimeAgo).UnixNano()
|
err = c.collectOneVolumeFileIds(dataNodeId, volumeId, vinfo, uint64(collectCutoffFromAtNs))
|
||||||
err = c.collectOneVolumeFileIds(dataNodeId, volumeId, vinfo, uint64(cutoffFrom))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to collect file ids from volume %d on %s: %v", volumeId, vinfo.server, err)
|
return fmt.Errorf("failed to collect file ids from volume %d on %s: %v", volumeId, vinfo.server, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue