Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

filer: reset bytesBuffer before use

banjiaojuhaoa07c93f4dd41
diff --git a/weed/filer/filechunk_manifest.go b/weed/filer/filechunk_manifest.go
index c74af226cc..afd9add99c 100644
--- a/weed/filer/filechunk_manifest.go
+++ b/weed/filer/filechunk_manifest.go
@@ -85,6 +85,7 @@ func ResolveOneChunkManifest(lookupFileIdFn wdclient.LookupFileIdFunctionType, c
// IsChunkManifest
bytesBuffer := bytesBufferPool.Get().(*bytes.Buffer)
+ bytesBuffer.Reset()
defer bytesBufferPool.Put(bytesBuffer)
err := fetchWholeChunk(bytesBuffer, lookupFileIdFn, chunk.GetFileIdString(), chunk.CipherKey, chunk.IsCompressed)
if err != nil {