add distributed lock manager

This commit is contained in:
chrislu
2023-06-25 14:14:40 -07:00
parent ee4f7cd636
commit 464a71a373
7 changed files with 236 additions and 196 deletions

View File

@@ -97,7 +97,7 @@ type FilerServer struct {
knownListeners map[int32]int32
// distributed lock manager
dlm *lock_manager.LockManager
dlm *lock_manager.DistributedLockManager
}
func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) (fs *FilerServer, err error) {
@@ -185,7 +185,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
fs.filer.Shutdown()
})
fs.dlm = lock_manager.NewLockManager()
fs.dlm = lock_manager.NewDistributedLockManager()
fs.filer.LockRing.SetTakeSnapshotCallback(fs.OnDlmChangeSnapshot)
return fs, nil