mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 07:25:01 +08:00
volume: fix memory leak during compaction
fix https://github.com/chrislusf/seaweedfs/issues/1222
This commit is contained in:
@@ -7,9 +7,10 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/klauspost/reedsolomon"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle_map"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/types"
|
||||
"github.com/klauspost/reedsolomon"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -42,6 +43,7 @@ func TestEncodingDecoding(t *testing.T) {
|
||||
|
||||
func validateFiles(baseFileName string) error {
|
||||
nm, err := readNeedleMap(baseFileName)
|
||||
defer nm.Close()
|
||||
if err != nil {
|
||||
return fmt.Errorf("readNeedleMap: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user