This commit is contained in:
chrislu
2023-06-25 14:30:58 -07:00
parent 26eff062c8
commit 868f7875d7
4 changed files with 28 additions and 27 deletions

View File

@@ -3,7 +3,6 @@ package weed_server
import (
"context"
"fmt"
"github.com/seaweedfs/seaweedfs/weed/cluster/lock_manager"
"net/http"
"os"
"sync"
@@ -95,9 +94,6 @@ type FilerServer struct {
// track known metadata listeners
knownListenersLock sync.Mutex
knownListeners map[int32]int32
// distributed lock manager
dlm *lock_manager.DistributedLockManager
}
func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) (fs *FilerServer, err error) {
@@ -185,8 +181,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
fs.filer.Shutdown()
})
fs.dlm = lock_manager.NewDistributedLockManager()
fs.filer.LockRing.SetTakeSnapshotCallback(fs.OnDlmChangeSnapshot)
fs.filer.Dlm.LockRing.SetTakeSnapshotCallback(fs.OnDlmChangeSnapshot)
return fs, nil
}