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

fifottl: fix release/bury next_event setup #66

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

oleg-jukovec
Copy link
Contributor

@oleg-jukovec oleg-jukovec commented Sep 6, 2023

take sets up the next event time as current time + ttr, while release and bury do not update the next event time. This can lead to a task being deleted after take time + ttr after release or bury in the queue fiber.

To fix the issue we can copy approach from the queue module [1][2].

Closes #65

`take` sets up the next event time as current time + `ttr`, while
`release` and `bury` do not update the next event time. This can lead
to a task being deleted after `take time` + `ttr` after `release`
or `bury` in the queue fiber.

To fix the issue we can copy approach from the `queue` module [1][2].

1. https://github.com/tarantool/queue/blob/481b5fbf47a7db5c504c64a688b4f8a5fc765a45/queue/abstract/driver/fifottl.lua#L348-L351
2. https://github.com/tarantool/queue/blob/481b5fbf47a7db5c504c64a688b4f8a5fc765a45/queue/abstract/driver/fifottl.lua#L367-L370

Closes #65
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Pull Request Test Coverage Report for Build 6094473688

  • 16 of 16 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.8%) to 91.478%

Totals Coverage Status
Change from base Build 5324137126: 1.8%
Covered Lines: 848
Relevant Lines: 927

💛 - Coveralls

Copy link
Contributor

@LeonidVas LeonidVas left a comment

Choose a reason for hiding this comment

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

HI! Thank you for the patch.
LGTM.

@oleg-jukovec oleg-jukovec merged commit 0ed3a19 into master Sep 6, 2023
6 checks passed
@oleg-jukovec oleg-jukovec deleted the oleg-jukovec/gh-65-lost-tasks branch March 22, 2024 10:07
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.

Lost tasks after put/take/release
3 participants