Skip to content

fix(OnEvict): Set missing Expiration field on evicted items#345

Merged
mangalaman93 merged 1 commit intodgraph-io:mainfrom
0x1ee7:main
Aug 31, 2023
Merged

fix(OnEvict): Set missing Expiration field on evicted items#345
mangalaman93 merged 1 commit intodgraph-io:mainfrom
0x1ee7:main

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 requested a review from a user August 31, 2023 06:34
@mangalaman93 mangalaman93 merged commit f0e7027 into dgraph-io:main Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants