aboutsummaryrefslogtreecommitdiff
path: root/weed/cluster/lock_client.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-06-25 20:30:20 -0700
committerchrislu <chris.lu@gmail.com>2023-06-25 20:30:20 -0700
commit61c42f9991e117ca6097c6429bb306b7e05758e2 (patch)
tree470481b1894c37cd60e51b57874ce06fd4ad9554 /weed/cluster/lock_client.go
parentaafb874ad2b4b39090ec644077df464c5b04f988 (diff)
downloadseaweedfs-61c42f9991e117ca6097c6429bb306b7e05758e2.tar.xz
seaweedfs-61c42f9991e117ca6097c6429bb306b7e05758e2.zip
adjust lock APIs
Diffstat (limited to 'weed/cluster/lock_client.go')
-rw-r--r--weed/cluster/lock_client.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/cluster/lock_client.go b/weed/cluster/lock_client.go
index de37476a9..c76b3c9bd 100644
--- a/weed/cluster/lock_client.go
+++ b/weed/cluster/lock_client.go
@@ -3,6 +3,7 @@ package cluster
import (
"context"
"fmt"
+ "github.com/seaweedfs/seaweedfs/weed/cluster/lock_manager"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/pb"
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
@@ -42,7 +43,7 @@ func (lc *LockClient) NewLockWithTimeout(filer pb.ServerAddress, key string, loc
// NewLock creates a lock with a very long duration
func (lc *LockClient) NewLock(filer pb.ServerAddress, key string) (lock *LiveLock) {
- return lc.doNewLock(filer, key, time.Duration(1<<63-1))
+ return lc.doNewLock(filer, key, lock_manager.MaxDuration)
}
func (lc *LockClient) doNewLock(filer pb.ServerAddress, key string, lockDuration time.Duration) (lock *LiveLock) {