ChunkCache drops a dirty chunk if saving it during eviction fails
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
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cloud, java
- Lĩnh vực
- data-engineering
Hướng nghiên cứu
Start with ChunkCache and the eviction listener wired through Caffeine's .executor(Runnable::run), plus the chunkSaver.save call that catches IOException and NonWritableChannelException. The issue suggests a side map drained by flush() or excluding dirty chunks from eviction, but the design choice is open. Done means a dirty chunk survives a failed save during eviction and is written or reported by force(), which needs fault-injected tests since reproduction is unclear.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I was reading ChunkCache while working on #370 and noticed this:
try {
chunkSaver.save(index, chunk);
} catch (IOException | NonWritableChannelException e) {
exceptionsDuringWrite.add(e);
}
bufferPool.recycle(chunk.data());
By the time this runs the chunk is already out of the cache, so if the save fails there is nothing left to retry. The exception is recorded and surfaces later in force(), but the data is gone, and the write() that produced it had already returned, so from the caller's side it looks written.
The cache holds at most five idle chunks (MAX_CACHED_CLEARTEXT_CHUNKS), so writing a file with more chunks evicts dirty ones as a matter of course. A transient ENOSPC or EIO at the wrong moment is enough.
I have not tried to reproduce it. It needs the save to fail exactly during eviction, so I guess it takes fault injection rather than a real filesystem.
It also does not look like a one-liner: the listener runs inside Caffeine's eviction (.executor(Runnable::run)), so re-inserting from there would just evict again. Keeping failed chunks in a side map drained by flush(), or keeping dirty chunks out of eviction altogether, both seem plausible.
Happy to take this if you think it is worth fixing.
- Ngôn ngữ chính
- Java
- Star
- 110
- Fork
- 39
- Merge trung bình
- 1 ngày 28 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọ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 cryptomator/cryptofs
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
cryptomator/cryptofs#246 · 6 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
cryptomator/cryptofs#177 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
cryptomator/cryptofs#171 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
cryptomator/cryptofs#153 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
cryptomator/cryptofs#151 ·
Tất cả issue của cryptomator/cryptofs
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
wultra/powerauth-tests#980 ·
-
account bug communication lecture
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/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 78/100
line/centraldogma#1397 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug]: Fixed/recurring deposit accounts are treated as savings in ownership and listingsCó thể đã có người làm @Aana123 đã nhận hôm nay. Đang mởbug Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/fineract-consumer-facing#252 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
cryptomator/hub#515 ·