fifottl queue entries with an explicit ttl get stuck in an odd state
还没有人认领这个 Issue。
评估
调研方向
从链接的复现项目及其 docker/Dockerfile 开始,然后在 Docker 中运行 npm i、build.sh 和 npm run test。检查对 concurrent queue.tube.test_buffer:take、put 和 ack 的调用,尤其是显式 ttl 的情况。完成的标准是:条目不会以 ttl 0 和较大的 next_event 留下,并且复现项目不再留下因错误过期而无法通过 take 获取的任务。
由索引模型根据 Issue 内容生成。
描述
when this syntax is used to put data in the buffer
queue.tube.test_buffer:put(data, {ttr=60, ttl=15768000000000000})
You end up with entries that have a ttl of 0 and a large next_event time
issue after the test fails the buffer has entries in a state where the ttl is 0, but next event is large [[select "task_id" from "test_buffer" where "ttl" = 0;]] the entries are not returned from take as they are expired, but they should not have expired
using docker image tarantool/tarantool:2.8.4
and a nodejs client
Place tarantool --version output here.
Tarantool 2.8.4-0-g47e6bd362
Target: Linux-x86_64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=ON
Compiler: /usr/bin/cc /usr/bin/c++
C_FLAGS: -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -fopenmp -msse2 -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-gnu-alignof-expression -fno-gnu89-inline -Wno-cast-function-type
CXX_FLAGS: -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -fopenmp -msse2 -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type
Steps to reproduce
see the project at
https://github.com/mannnick24/tarantool-fifottl-explicit-ttl/blob/main/docker/Dockerfile
this code uses node tarantool connection to concurrently call queue.tube.test_buffer:take, queue.tube.test_buffer:put and queue.tube.test_buffer:ack
How to run:
npm i
build.sh (in docker)
npm run test
Actual behavior
after the test fails the buffer has entries in a state where the ttl is 0, but next event is large [[select "task_id" from "test_buffer" where "ttl" = 0;]] the entries are not returned from take as they are expired, but they should not have expired
e.g. box.execute([[select "task_id", "status", "created", "ttr", "ttl", "next_event" from "el_buffer" where "ttl" = 0 limit 20;]])
metadata:
name: task_id type: unsigned
name: status type: string
name: created type: unsigned
name: ttr type: unsigned
name: ttl type: unsigned
name: next_event type: unsigned rows:
[4, 'r', 1662662470225835, 60000000, 0, 18446744073709551615]
Expected behavior
the buffer would be empty
- 主要语言
- Lua
- 星标
- 244
- 派生
- 56
- 平均合并
- 6 天 8 小时
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tarantool/queue 的其他 Issue
-
documentation good first issue
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 3/5 1-2 天 新手友好度 76/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 55/100
-
1sp bug teamE
难度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
LandSandBoat/server#11579 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
ArchiveTeam/sinavideo-grab#7 · 3 个 reaction ·
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
mailcow/mailcow-dockerized#7480 ·
-
mapper bug
难度 2/5 1-3 小时 新手友好度 88/100