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(OnEvict): Set missing Expiration field on evicted items #345

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

0x1ee7
Copy link
Contributor

@0x1ee7 0x1ee7 commented Jul 26, 2023

On our use case we need to rely on expiration timestamps but we realized that they return zero timestamps. Our assumption is that this is due to a bug and not by design.

Problem

When OnEvict callback is executed Item does not have Expiration field set. Considering it is a public field this needs to be set and available.

Solution

Initialize Expiration field before calling the onEvict callback

@CLAassistant
Copy link

CLAassistant commented Jul 26, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mangalaman93 mangalaman93 merged commit f0e7027 into dgraph-io:main Aug 31, 2023
7 of 8 checks passed
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

3 participants