fix invalid memory address or nil pointer dereference on filer.sync

fix https://github.com/seaweedfs/seaweedfs/issues/3826
This commit is contained in:
chrislu 2022-10-11 21:58:17 -07:00
parent f6c8720ded
commit 0d817bc347

View file

@ -54,7 +54,6 @@ func (fs *FilerSink) IsIncremental() bool {
func (fs *FilerSink) Initialize(configuration util.Configuration, prefix string) error { func (fs *FilerSink) Initialize(configuration util.Configuration, prefix string) error {
fs.isIncremental = configuration.GetBool(prefix + "is_incremental") fs.isIncremental = configuration.GetBool(prefix + "is_incremental")
fs.dataCenter = configuration.GetString(prefix + "dataCenter") fs.dataCenter = configuration.GetString(prefix + "dataCenter")
fs.executor = util.NewLimitedConcurrentExecutor(32)
return fs.DoInitialize( return fs.DoInitialize(
"", "",
configuration.GetString(prefix+"grpcAddress"), configuration.GetString(prefix+"grpcAddress"),
@ -85,6 +84,7 @@ func (fs *FilerSink) DoInitialize(address, grpcAddress string, dir string,
fs.diskType = diskType fs.diskType = diskType
fs.grpcDialOption = grpcDialOption fs.grpcDialOption = grpcDialOption
fs.writeChunkByFiler = writeChunkByFiler fs.writeChunkByFiler = writeChunkByFiler
fs.executor = util.NewLimitedConcurrentExecutor(32)
return nil return nil
} }