From f9131de43f6ddea7a935fa346c958eb664d0f509 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 4 Feb 2024 12:47:21 -0800 Subject: [PATCH] fix lock TTL --- weed/mq/broker/broker_server.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/weed/mq/broker/broker_server.go b/weed/mq/broker/broker_server.go index 6a9e475d1..15a3fea16 100644 --- a/weed/mq/broker/broker_server.go +++ b/weed/mq/broker/broker_server.go @@ -93,10 +93,9 @@ func NewMessageBroker(option *MessageQueueBrokerOption, grpcDialOption grpc.Dial } }) for { - - time.Sleep(time.Second) - if err := mqBroker.lockAsBalancer.AttemptToLock(lock_manager.RenewInterval); err != nil { - glog.V(0).Infof("AttemptToLock: %v", err) + time.Sleep(lock_manager.RenewInterval) + if err := mqBroker.lockAsBalancer.AttemptToLock(lock_manager.LiveLockTTL); err != nil { + glog.V(4).Infof("AttemptToLock: %v", err) } } }()