Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Set internal _syncAfter using only AutomaticRefreshInterval - ConfigurationManager updating keys too frequently #2866

Closed
jennyf19 opened this issue Oct 2, 2024 · 2 comments
Assignees
Labels
Bug Product is not functioning as expected P1 More important, prioritize highly Regression:perf performance related regression
Milestone

Comments

@jennyf19
Copy link
Collaborator

jennyf19 commented Oct 2, 2024

The internal _syncAfter field controls if metadata is refreshed (http call).
The value was set to the minimum of AutomaticRefreshInterval and RefreshInterval.

RefreshInterval controls the interval that must pass for RequestRefresh() to make an http call.
RefreshInterval is usually a much smaller timespan, so in effect many more calls would be made to obtain metadata.

This fix only uses the AutomaticRefreshInterval to set _syncAfter.
This has the side effect of extending the time for the next AutomaticRequest, however, that makes sense.

@jennyf19 jennyf19 added P1 More important, prioritize highly Bug Product is not functioning as expected labels Oct 2, 2024
@tustyan-vcc
Copy link

tustyan-vcc commented Oct 2, 2024

There is a relevant comment in another issue.
#2774 (comment)

Also it seems there is another issue with using Interlocked.CompareExchange method mentioned there, that also causes a lot more calls towards metadata endpoint when several threads try to validate the token:
#2774 (comment)

@jennyf19 jennyf19 added this to the 8.1.1 milestone Oct 3, 2024
@jennyf19
Copy link
Collaborator Author

jennyf19 commented Oct 5, 2024

@jennyf19 jennyf19 closed this as completed Oct 5, 2024
@jennyf19 jennyf19 added the Regression:perf performance related regression label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Product is not functioning as expected P1 More important, prioritize highly Regression:perf performance related regression
Projects
None yet
Development

No branches or pull requests

3 participants