mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid repeatedly adding manifest chunks
This commit is contained in:
parent
28fe578944
commit
86657ed3a8
|
@ -152,13 +152,14 @@ func (wfs *WFS) doFlush(fh *FileHandle, uid, gid uint32) fuse.Status {
|
||||||
manifestChunks, nonManifestChunks := filer.SeparateManifestChunks(entry.GetChunks())
|
manifestChunks, nonManifestChunks := filer.SeparateManifestChunks(entry.GetChunks())
|
||||||
|
|
||||||
chunks, _ := filer.CompactFileChunks(wfs.LookupFn(), nonManifestChunks)
|
chunks, _ := filer.CompactFileChunks(wfs.LookupFn(), nonManifestChunks)
|
||||||
|
fh.entryChunkGroup.SetChunks(chunks)
|
||||||
|
|
||||||
chunks, manifestErr := filer.MaybeManifestize(wfs.saveDataAsChunk(fileFullPath), chunks)
|
chunks, manifestErr := filer.MaybeManifestize(wfs.saveDataAsChunk(fileFullPath), chunks)
|
||||||
if manifestErr != nil {
|
if manifestErr != nil {
|
||||||
// not good, but should be ok
|
// not good, but should be ok
|
||||||
glog.V(0).Infof("MaybeManifestize: %v", manifestErr)
|
glog.V(0).Infof("MaybeManifestize: %v", manifestErr)
|
||||||
}
|
}
|
||||||
entry.Chunks = append(chunks, manifestChunks...)
|
entry.Chunks = append(chunks, manifestChunks...)
|
||||||
fh.entryChunkGroup.SetChunks(entry.Chunks)
|
|
||||||
|
|
||||||
wfs.mapPbIdFromLocalToFiler(request.Entry)
|
wfs.mapPbIdFromLocalToFiler(request.Entry)
|
||||||
defer wfs.mapPbIdFromFilerToLocal(request.Entry)
|
defer wfs.mapPbIdFromFilerToLocal(request.Entry)
|
||||||
|
|
Loading…
Reference in a new issue