|
@ -94,10 +94,10 @@ func (f *Filer) doDeleteFileIds(fileIds []string) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (f *Filer) DirectDeleteChunks(chunks []*filer_pb.FileChunk) { |
|
|
func (f *Filer) DirectDeleteChunks(chunks []*filer_pb.FileChunk) { |
|
|
var fildIdsToDelete []string |
|
|
|
|
|
|
|
|
var fileIdsToDelete []string |
|
|
for _, chunk := range chunks { |
|
|
for _, chunk := range chunks { |
|
|
if !chunk.IsChunkManifest { |
|
|
if !chunk.IsChunkManifest { |
|
|
fildIdsToDelete = append(fildIdsToDelete, chunk.GetFileIdString()) |
|
|
|
|
|
|
|
|
fileIdsToDelete = append(fileIdsToDelete, chunk.GetFileIdString()) |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|
dataChunks, manifestResolveErr := ResolveOneChunkManifest(f.MasterClient.LookupFileId, chunk) |
|
|
dataChunks, manifestResolveErr := ResolveOneChunkManifest(f.MasterClient.LookupFileId, chunk) |
|
@ -105,12 +105,12 @@ func (f *Filer) DirectDeleteChunks(chunks []*filer_pb.FileChunk) { |
|
|
glog.V(0).Infof("failed to resolve manifest %s: %v", chunk.FileId, manifestResolveErr) |
|
|
glog.V(0).Infof("failed to resolve manifest %s: %v", chunk.FileId, manifestResolveErr) |
|
|
} |
|
|
} |
|
|
for _, dChunk := range dataChunks { |
|
|
for _, dChunk := range dataChunks { |
|
|
fildIdsToDelete = append(fildIdsToDelete, dChunk.GetFileIdString()) |
|
|
|
|
|
|
|
|
fileIdsToDelete = append(fileIdsToDelete, dChunk.GetFileIdString()) |
|
|
} |
|
|
} |
|
|
fildIdsToDelete = append(fildIdsToDelete, chunk.GetFileIdString()) |
|
|
|
|
|
|
|
|
fileIdsToDelete = append(fileIdsToDelete, chunk.GetFileIdString()) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
f.doDeleteFileIds(fildIdsToDelete) |
|
|
|
|
|
|
|
|
f.doDeleteFileIds(fileIdsToDelete) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (f *Filer) DeleteChunks(chunks []*filer_pb.FileChunk) { |
|
|
func (f *Filer) DeleteChunks(chunks []*filer_pb.FileChunk) { |
|
|