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

fix pricing sync issue #150

Merged
merged 2 commits into from
Aug 3, 2022
Merged

fix pricing sync issue #150

merged 2 commits into from
Aug 3, 2022

Conversation

bwagner5
Copy link
Contributor

Issue #, if available:
#129

Description of changes:

  • Fix at least one cause of pricing cache issue.

On startup, the cache file is loaded, but all items could be expired. The expiration deletion isn't run initially on load, instead the cleanup interval is used to delete expired items. To use the cache, the number of items in the cache is expected to be non-zero, but the items could be non-zero and all expired. So first, this change deletes all expired items in the cache on initial load (which is synchronous). This change also adds a mutex to each pricing refresh so that bulk refreshes are prioritized over individual lookups.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bwagner5 bwagner5 requested a review from a team as a code owner July 29, 2022 23:43
Copy link

@LikithaVemulapalli LikithaVemulapalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Brandon, great work. LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants