fifottl queue entries with an explicit ttl get stuck in an odd state
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
リンクされている再現プロジェクトとその docker/Dockerfile から始め、次に npm i、Docker 内での 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時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
tarantool/queue の issue をすべて見る
似ている 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 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mailcow/mailcow-dockerized#7480 ·
-
mapper bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100