fifottl queue entries with an explicit ttl get stuck in an odd state
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với dự án tái hiện được liên kết và docker/Dockerfile của nó, sau đó chạy npm i, build.sh trong Docker và npm run test. Kiểm tra các lệnh gọi đồng thời tới queue.tube.test_buffer:take, put và ack, đặc biệt là trường hợp ttl được chỉ định rõ ràng. Được xem là hoàn tất khi các entry không còn ở trạng thái có ttl 0 và next_event lớn, đồng thời bản tái hiện không còn để các task hết hạn không đúng cách ở trạng thái không thể truy cập từ take.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Lua
- Star
- 244
- Fork
- 56
- Merge trung bình
- 6 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tarantool/queue
-
tube:grant() is not documented Đang mởdocumentation good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
*ttl drivers: TTL branch dereferences delete() result without a nil check, killing the fiber Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
1sp bug teamE
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Tất cả issue của tarantool/queue
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
LandSandBoat/server#11579 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ArchiveTeam/sinavideo-grab#7 · 3 reaction ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mailcow/mailcow-dockerized#7480 ·