azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

Added a short delay to `AccessTokenCache.getToken()` to avoid an async-busy-loop when sharing cache

Open vcolin7 opened this issue 3 years ago • 1 comments

Fixes: #30466, #28364.

Description

Added a short delay to AccessTokenCache.getToken() to avoid an async-busy-loop when the first thread to attempt the retrieval of a new token takes longer than usual and the cache is shared amongst many threads.

For more details follow this link.

All SDK Contribution checklist:

  • [X] The pull request does not introduce [breaking changes]
  • [X] CHANGELOG is updated for new features, bug fixes, or other significant changes.
  • [X] I have read the contribution guidelines.

General Guidelines and Best Practices

  • [X] Title of the pull request is clear and informative.
  • [X] There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • [X] Pull request includes test coverage for the included changes.

vcolin7 avatar Sep 23 '22 01:09 vcolin7

API change check

API changes are not detected in this pull request.

azure-sdk avatar Sep 23 '22 01:09 azure-sdk