Tasks ttl and ttr wrong behavior
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 244
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
When we put a task with ttl and ttr set, it behaves incorrectly.
Example:
queue = require 'queue'
queue.create_tube('test_ttr', 'fifottl')
queue.tube.test_ttr:put('foobar', {ttr=100, ttl=5})
queue.tube.test_ttr:take(0)
----- Wait six seconds
queue.tube.test_ttr:ack(0)
- error: Task was not taken in the session
I think this behavior is due to the fact that the task was removed from the queue after ttl = 5 seconds.
But in my opinion, when the task was taken, it should has a new ttl in the queue = remaining time + ttr
Something like that 3+100 and it should ack() correctly without error within 103 seconds
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior using queue.create_tube, tube:put, tube:take, and tube:ack with ttl=5 and ttr=100, then inspect how the task lifecycle handles expiration after take. Done means a taken task remains acknowledgeable for the remaining ttl plus its ttr, rather than returning “Task was not taken in the session.”
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100