storage-postgres: UpdateTable during the DELETING window waits up to 3 s behind the delete poller's lock
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
On PostgreSQL, an UpdateTable sent during a table's DELETING window can take up to 3 s to be refused. Measured on #550's branch with the window held by a lock on the data table: twelve UpdateTable calls at 0.5 s spacing, ten refused in 2 to 5 ms, two in 1256 ms and 2922 ms. Every answer was the right one (ResourceInUseException, Table is being deleted).
Cause
The delete poller claims the DELETING catalog row FOR UPDATE SKIP LOCKED (crates/storage-postgres/src/worker_store.rs:73) and holds it while its data drop waits out the 3 s lock_timeout. update_table (crates/storage-postgres/src/update_table.rs:99) selects the row FOR UPDATE, so a call that lands during a poller attempt waits for the attempt to time out before it reads the status and refuses.
Fix shape
Read the status with FOR SHARE or without a lock before taking FOR UPDATE, or have the poller release the row lock before the drop attempt. A test that holds the row as the poller does and asserts an UpdateTable refusal under 100 ms.
Found while reviewing #505.
- Ngôn ngữ chính
- Rust
- Star
- 517
- Fork
- 60
- Merge trung bình
- 2 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- 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 ExtendDB/extenddb
-
backend:mongodb bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 2 ngày
-
backend:cassandra bug
Độ khó 2/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 2 ngày
-
documentation
Độ khó 2/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 2 ngày
-
backend:cassandra bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[storage.cassandra] accepts unknown keys silentlyCó thể đã có người làm @LeeroyHannigan đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ExtendDB/extenddb#540 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của ExtendDB/extenddb
Issue tương tự
-
area:io kernel-paused needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bherbruck/solvecraft#7854 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
transit-audio/transit#159 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
HakanSeven12/OpenCADStudio#2257 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: low ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
storytold/photocraft#9884 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage: new type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Jagalite/superseedr#376 ·
Maintainer thường phản hồi trong vòng 1 ngày