mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
volume.fsck: follow manifest chunks
This commit is contained in:
parent
44057a4de1
commit
885c624bce
|
@ -11,6 +11,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||||
"github.com/chrislusf/seaweedfs/weed/operation"
|
"github.com/chrislusf/seaweedfs/weed/operation"
|
||||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||||
|
@ -196,7 +197,12 @@ func (c *commandVolumeFsck) collectFilerFileIds(tempFolder string, volumeIdToSer
|
||||||
files[i.vid].Write(buffer)
|
files[i.vid].Write(buffer)
|
||||||
}
|
}
|
||||||
}, func(entry *filer_pb.FullEntry, outputChan chan interface{}) (err error) {
|
}, func(entry *filer_pb.FullEntry, outputChan chan interface{}) (err error) {
|
||||||
for _, chunk := range entry.Entry.Chunks {
|
dChunks, mChunks, resolveErr := filer2.ResolveChunkManifest(filer2.LookupFn(c.env), entry.Entry.Chunks)
|
||||||
|
if resolveErr != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
dChunks = append(dChunks, mChunks...)
|
||||||
|
for _, chunk := range dChunks {
|
||||||
outputChan <- &Item{
|
outputChan <- &Item{
|
||||||
vid: chunk.Fid.VolumeId,
|
vid: chunk.Fid.VolumeId,
|
||||||
fileKey: chunk.Fid.FileKey,
|
fileKey: chunk.Fid.FileKey,
|
||||||
|
|
Loading…
Reference in a new issue