mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 01:59:23 +08:00
volume.fsck: follow manifest chunks
This commit is contained in:
@@ -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,
|
||||||
|
Reference in New Issue
Block a user