diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-08-23 18:30:11 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-08-23 18:30:11 -0700 |
| commit | 2cdad77d828681ffa05683d47f39af2183d71e34 (patch) | |
| tree | d5248a30343c2deb92c7ae314dc9c9ff358896a6 | |
| parent | 81a8aa6581a9db0abb4b7f82d7bcfb2f361f6332 (diff) | |
| download | seaweedfs-2cdad77d828681ffa05683d47f39af2183d71e34.tar.xz seaweedfs-2cdad77d828681ffa05683d47f39af2183d71e34.zip | |
fix checkin error1.91
| -rw-r--r-- | weed/filer2/filechunk_manifest.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/weed/filer2/filechunk_manifest.go b/weed/filer2/filechunk_manifest.go index 037b0c1e8..bde4ddf27 100644 --- a/weed/filer2/filechunk_manifest.go +++ b/weed/filer2/filechunk_manifest.go @@ -26,6 +26,18 @@ func HasChunkManifest(chunks []*filer_pb.FileChunk) bool { return false } +func SeparateManifestChunks(chunks []*filer_pb.FileChunk) (manifestChunks, nonManifestChunks []*filer_pb.FileChunk) { + for _, c := range chunks { + if !c.IsChunkManifest { + manifestChunks = append(manifestChunks, c) + } else { + nonManifestChunks = append(nonManifestChunks, c) + } + } + return +} + + func ResolveChunkManifest(lookupFileIdFn LookupFileIdFunctionType, chunks []*filer_pb.FileChunk) (dataChunks, manifestChunks []*filer_pb.FileChunk, manefestResolveErr error) { // TODO maybe parallel this for _, chunk := range chunks { |
