Log global lock acquisition per user (#2039)

This commit is contained in:
Maycon Santos
2024-05-23 17:09:58 +02:00
committed by GitHub
parent 6b01b0020e
commit 29a2d93873
2 changed files with 4 additions and 0 deletions

View File

@ -910,8 +910,10 @@ func (am *DefaultAccountManager) SaveOrAddUser(accountID, initiatorUserID string
// GetOrCreateAccountByUser returns an existing account for a given user id or creates a new one if doesn't exist
func (am *DefaultAccountManager) GetOrCreateAccountByUser(userID, domain string) (*Account, error) {
start := time.Now()
unlock := am.Store.AcquireGlobalLock()
defer unlock()
log.Debugf("Acquired global lock in %s for user %s", time.Since(start), userID)
lowerDomain := strings.ToLower(domain)