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 RESTORE to create a key without expire under the same ms #1705

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

enjoy-binbin
Copy link
Member

I am unable to reproduce it, but if the ttl_ms (absttl) passed in
happens to be in the same ms as GetTimeStampMS, the ttl_ms < now
will be false and ttl_ms -= now will make ttl_ms become 0 and then
we will create a key without any expire. It is off by one bug.

I am unable to reproduce it, but if the ttl_ms (absttl) passed in
happens to be in the same ms as GetTimeStampMS, the `ttl_ms < now`
will be false and `ttl_ms -= now` will make ttl_ms become 0 and then
we will create a key without any expire. It is off by one bug.
@enjoy-binbin enjoy-binbin requested a review from git-hulk August 28, 2023 04:19
Copy link
Member

@git-hulk git-hulk left a comment

Choose a reason for hiding this comment

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

Good catch, thank you!

Copy link
Member

@mapleFU mapleFU left a comment

Choose a reason for hiding this comment

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

Great catch!

@enjoy-binbin enjoy-binbin merged commit f69982e into apache:unstable Aug 28, 2023
@enjoy-binbin enjoy-binbin deleted the fix_restore_off_by_one branch August 28, 2023 06:25
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.

3 participants