Compare commits

...

1 Commits

Author SHA1 Message Date
Maycon Santos
3b19e8c57e Use Trace level for account lock messages 2023-04-04 20:04:18 +02:00

View File

@@ -240,7 +240,7 @@ func (s *FileStore) AcquireGlobalLock() (unlock func()) {
// AcquireAccountLock acquires account lock and returns a function that releases the lock
func (s *FileStore) AcquireAccountLock(accountID string) (unlock func()) {
log.Debugf("acquiring lock for account %s", accountID)
log.Tracef("acquiring lock for account %s", accountID)
start := time.Now()
value, _ := s.accountLocks.LoadOrStore(accountID, &sync.Mutex{})
mtx := value.(*sync.Mutex)
@@ -248,7 +248,7 @@ func (s *FileStore) AcquireAccountLock(accountID string) (unlock func()) {
unlock = func() {
mtx.Unlock()
log.Debugf("released lock for account %s in %v", accountID, time.Since(start))
log.Tracef("released lock for account %s in %v", accountID, time.Since(start))
}
return unlock