Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix: encountering expired items during the traversal process will result in zero values in the output. #163

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

DCjanus
Copy link
Contributor

@DCjanus DCjanus commented Dec 12, 2023

No description provided.

@hashicorp-cla
Copy link

hashicorp-cla commented Dec 12, 2023

CLA assistant check
All committers have signed the CLA.

@DCjanus
Copy link
Contributor Author

DCjanus commented Dec 25, 2023

@irenarindos @mgaffney Hi, would you mind take a look at this PR? I believe it is simple enough.

@mgaffney
Copy link
Member

mgaffney commented Jan 9, 2024

Can you add a test for this?

@DCjanus
Copy link
Contributor Author

DCjanus commented Jan 10, 2024

Can you add a test for this?

Since there is a background goroutine to call deleteExpired, before we inject a custom clock, it's hard to provide such a test case.

We meet this case when: after a round of deleteExpired execution, an object expired. Before the next round of deleteExpired execution, we called the Values() method.

@mgaffney mgaffney merged commit 53739fc into hashicorp:main Jan 10, 2024
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants