diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-09 22:29:02 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-09 22:29:02 -0700 |
| commit | 0871d2cff091e43190065bd17dba624cf6da1d6d (patch) | |
| tree | 3979790d89967d24e804f8e19c43ba3f729e1212 /weed/storage/erasure_coding/ec_test.go | |
| parent | 1f8fc4b5edfeb9838345de146beb1ec033231dd3 (diff) | |
| download | seaweedfs-0871d2cff091e43190065bd17dba624cf6da1d6d.tar.xz seaweedfs-0871d2cff091e43190065bd17dba624cf6da1d6d.zip | |
volume: fix memory leak during compaction
fix https://github.com/chrislusf/seaweedfs/issues/1222
Diffstat (limited to 'weed/storage/erasure_coding/ec_test.go')
| -rw-r--r-- | weed/storage/erasure_coding/ec_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/storage/erasure_coding/ec_test.go b/weed/storage/erasure_coding/ec_test.go index b2c94cfd7..92b83cdc8 100644 --- a/weed/storage/erasure_coding/ec_test.go +++ b/weed/storage/erasure_coding/ec_test.go @@ -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) } |
