Append is not cancel safe
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
Start by tracing append_record through the in-memory updates described in the issue, then inspect mem/queue.rs:87 and the record_metas and concatenated_records updates. Reproduce cancellation with a tokio timeout or task cancellation. Done means cancellation cannot leave disk and RAM inconsistent, cause the reported panic, or make reloading identify corruption.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
If append_record is not "polled to its end", for instance if it is wrapped in tokio timeout, or if the task running it is cancelled,
then we can end up in a corrupted state.
The code looks as follows
- get next record position by looking at the last record in RAM.
- write on disk
- (C) write on RAM
If the task is stopped in the middle of (C), we end up in a state where what is on disk does not match what is in RAM.
In particular, on the next add, we will use a record position that might actually already be on disk.
As we reload the mrecordlog from disk, this is identified as a corruption.
This has been observed in prod.
A second case also observed is a straight panic.
Here the cause the preemption is assumed to have happened after we appended the record metas
and before we had populated the concatenated_records rolling buffer.
self.record_metas.push(record_meta);
self.concatenated_records.extend(payload);
The panic reported is
2024-02-28T23:41:54Z app[7816406b969758] iad [info]thread 'tokio-runtime-worker' panicked at /usr/local/cargo/git/checkouts/mrecordlog-34aad39ce3e0e659/bc6a998/src/mem/queue.rs:87:46:
2024-02-28T23:41:54Z app[7816406b969758] iad [info]slice index starts at 928 but ends at 0
- Ngôn ngữ chính
- Rust
- Star
- 33
- Fork
- 11
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
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 quickwit-oss/mrecordlog
-
Save RAMĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
quickwit-oss/mrecordlog#57 ·
-
mrecordlog truncates too earlyĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
quickwit-oss/mrecordlog#51 ·
-
Manual sync modeCó thể làm lại được @guilload đã nhận 1235 ngày trước và không có pull request nào đang mở. Đang mở
quickwit-oss/mrecordlog#42 · 1 người được giao ·
-
Concurrent mrecordlogĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
quickwit-oss/mrecordlog#41 ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
quickwit-oss/mrecordlog#37 ·
Tất cả issue của quickwit-oss/mrecordlog
Issue tương tự
-
[M09] Silence parser misreads ffmpeg times in scientific notation (6.25e-05 → 6.25 s)Có thể đã có người làm @G-darshan-32 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
clipy-recorder/clipy#164 · 1 bình luận ·
-
p2 ready-mac
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
quickwit-oss/tantivy#3299 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
arcships/dim#2294 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`stream enable` fails with "already enabled" on every fresh session since streaming became always-onĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vercel-labs/agent-browser#2797 ·
Maintainer thường phản hồi trong vòng 1 ngày