From 0d817bc347188c2dd994245f992472690395c85d Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 11 Oct 2022 21:58:17 -0700 Subject: [PATCH] fix invalid memory address or nil pointer dereference on filer.sync fix https://github.com/seaweedfs/seaweedfs/issues/3826 --- weed/replication/sink/filersink/filer_sink.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/replication/sink/filersink/filer_sink.go b/weed/replication/sink/filersink/filer_sink.go index 3af5a4a80..b922be568 100644 --- a/weed/replication/sink/filersink/filer_sink.go +++ b/weed/replication/sink/filersink/filer_sink.go @@ -54,7 +54,6 @@ func (fs *FilerSink) IsIncremental() bool { func (fs *FilerSink) Initialize(configuration util.Configuration, prefix string) error { fs.isIncremental = configuration.GetBool(prefix + "is_incremental") fs.dataCenter = configuration.GetString(prefix + "dataCenter") - fs.executor = util.NewLimitedConcurrentExecutor(32) return fs.DoInitialize( "", configuration.GetString(prefix+"grpcAddress"), @@ -85,6 +84,7 @@ func (fs *FilerSink) DoInitialize(address, grpcAddress string, dir string, fs.diskType = diskType fs.grpcDialOption = grpcDialOption fs.writeChunkByFiler = writeChunkByFiler + fs.executor = util.NewLimitedConcurrentExecutor(32) return nil }