WAL ReadAll() truncates the file even upon transient I/O error
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- distributed-systems
Hướng nghiên cứu
Read the WAL's ReadAll() method and the readRecord call shown in the issue. Trace how readRecord reports transient I/O errors versus CRC corruption, then check the WAL tests for coverage of both cases. Done means transient read errors cause the process to fail without truncating the file, while corrupted records retain their intended handling.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In the WAL's ReadAll() method, we have the following code:
var payloads [][]byte
for bytesToRead > 0 {
payload, bytesRead, err := readRecord(w.file, bytesToRead)
// record was corrupted in wal
if err != nil {
return payloads, w.truncateAt(fileInfo.Size() - bytesToRead)
}
readRecord reads a record and checks its CRC. The readRecord therefore can fail due to two reasons:
- A transient read error
- A corruption of the records inside the file.
The handling in ReadAll doesn't distinguish between the two, and truncates the file anyway.
We therefore need to crash upon a transient read error instead of truncating the file.
- Ngôn ngữ chính
- Go
- Star
- 22
- Fork
- 4
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 43
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 ava-labs/Simplex
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Verification accepts aux info appends after the history is sufficient, changing the approval digestĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ava-labs/Simplex
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
blocked-needs-validation bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
projectcapsule/capsule#2280 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
kerti/balances-v2#801 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] AdvancedCronJob validating webhook reports incorrect field paths for concurrencyPolicy and pod templatesCó thể đã có người làm @bhuvan-somisetty đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openkruise/kruise#2650 ·
Maintainer thường phản hồi trong vòng 1 ngày