Skip to content

Commit

Permalink
Don't throw lock timeout if shell activated (#14756)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtkech authored Nov 26, 2023
1 parent 2eb6e14 commit 425b7f3
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,14 @@ internal async Task ActivateShellInternalAsync()
(var locker, var locked) = await ShellContext.TryAcquireShellActivateLockAsync();
if (!locked)
{
// The retry logic increases the delay between 2 attempts (max of 10s), so if there are too
// many concurrent requests, one may experience a timeout while waiting before a new retry.
if (ShellContext.IsActivated)
{
// Don't throw if the shell is activated.
return;
}

throw new TimeoutException($"Failed to acquire a lock before activating the tenant: {ShellContext.Settings.Name}");
}

Expand Down

0 comments on commit 425b7f3

Please sign in to comment.