Requests during a table's DELETING window answer differently from DynamoDB
Maintainer thường phản hồi trong vòng 4 ngà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
- 48/100
Hướng nghiên cứu
Start with crates/storage-postgres/src/delete_table.rs and update_table.rs, then trace the data-plane table lookup that excludes DELETING rows. Compare the PostgreSQL behavior with the DynamoDB responses listed for the four requests; the other backends are unmeasured. Done means the control-plane requests return the stated service error and the data-plane behavior during deletion is decided and matches the service.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
While a table is DELETING, ExtendDB answers four requests differently from DynamoDB. The service reports the window as a table that is still there and in use; ExtendDB reports it as a table that does not exist, or with a different sentence.
Measured on the service 2026-10-24 09:30 UTC (two repeats, identical) and on ExtendDB with the PostgreSQL backend at main 744ea291 and on #504, with the window held open by an ACCESS SHARE lock on the table's data table. The other backends are not measured here.
| Request during the window | ExtendDB | DynamoDB |
|---|---|---|
second DeleteTable |
400 ResourceNotFoundException Requested resource not found |
400 ResourceInUseException Attempt to change a resource which is still in use: Table is being deleted: <name> |
UpdateTable (any member) |
400 ResourceInUseException Table <name> is not in ACTIVE state |
400 ResourceInUseException Attempt to change a resource which is still in use: Table is being deleted: <name> |
PutItem |
400 ResourceNotFoundException |
200 |
GetItem |
400 ResourceNotFoundException |
200 with the item |
DescribeTable (TableStatus DELETING) and CreateTable with the name (ResourceInUseException Table already exists: <name>) match the service.
Cause
crates/storage-postgres/src/delete_table.rs selects the row WHERE ... table_status IN ('ACTIVE', 'CREATING'), so a DELETING row reads as TableNotFound. update_table.rs locks the row and answers TableNotActive for any status other than ACTIVE, which the engine words as Table <name> is not in ACTIVE state. The data-plane table lookup excludes DELETING rows, so reads and writes answer ResourceNotFoundException until the row is gone.
Fix shape
For the two control-plane requests, look the name up without the status filter when the filtered select returns nothing and answer a DELETING row with the service's sentence; delete_table.rs already does this for a table that is being restored. For the data plane, the service serves reads and writes until the table is gone, so the lookup would include DELETING rows; whether writes during the window should be served or refused is a design question, since a write that lands between the data drop and the row delete is lost on both sides.
With the default delete delay the window on ExtendDB lasts as long as the data drop takes, so a client only sees it when another connection holds a lock on the table's data.
Found while fixing #449 (#504).
- Ngôn ngữ chính
- Rust
- Star
- 517
- Fork
- 60
- Merge trung bình
- 5 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 41
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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 4 ngày
-
bug security
Độ 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 4 ngày
-
bug security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 4 ngày
-
extenddb version prints the first build's commit after a rebuild in the same target directoryĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của ExtendDB/extenddb
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/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 70/100
libnativeapi/nativeapi#21 ·
-
Độ 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 68/100
longbridge/nsh#804 ·
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 62/100
Maintainer thường phản hồi trong vòng 1 ngày