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

chore: simplify expired flow in StringFamily::Set #3643

Closed
wants to merge 1 commit into from
Closed

Conversation

kostasrim
Copy link
Contributor

@kostasrim kostasrim commented Sep 3, 2024

If the time argument of SET command is already expired we scheduled a transaction that deleted the (if existed) element that the set command would replace. This was not really needed as the logic around expired values already handles this case. Bonus points is that we also now don't schedule a different transaction (OpDel) when we parse the arguments (and let the normal flow continue)

  • handle already expired values in db_slice instead of explicit OpDel
  • small refactor

@kostasrim kostasrim requested a review from romange September 3, 2024 21:13
@kostasrim kostasrim self-assigned this Sep 3, 2024
// past time
at_ms = op_args_.db_cntx.time_now_ms - 1;
}

if (!(params.flags & SET_KEEP_EXPIRE)) {
if (at_ms) { // Command has an expiry paramater.
if (IsValid(e_it)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

where do we delete the entry in this flow? can you point to the flow

@kostasrim
Copy link
Contributor Author

I am closing this since the changes appears to be subjective.

@kostasrim kostasrim closed this Sep 4, 2024
@kostasrim kostasrim deleted the kp2 branch December 13, 2024 08:34
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.

2 participants