From 9e5b1eef9b0a7ce3bfd5a102d95ef64bbc6d3a3d Mon Sep 17 00:00:00 2001 From: wang wusong Date: Thu, 14 Sep 2023 19:31:49 +0800 Subject: [PATCH] avoid passe lock by value --- weed/mount/dirty_pages_chunked.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/weed/mount/dirty_pages_chunked.go b/weed/mount/dirty_pages_chunked.go index 76a3be1be..25b071e7d 100644 --- a/weed/mount/dirty_pages_chunked.go +++ b/weed/mount/dirty_pages_chunked.go @@ -2,11 +2,12 @@ package mount import ( "fmt" + "io" + "sync" + "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/mount/page_writer" "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" - "io" - "sync" ) type ChunkedDirtyPages struct { @@ -82,7 +83,7 @@ func (pages *ChunkedDirtyPages) saveChunkedFileIntervalToStorage(reader io.Reade } -func (pages ChunkedDirtyPages) Destroy() { +func (pages *ChunkedDirtyPages) Destroy() { pages.uploadPipeline.Shutdown() }