storage-postgres: the data path assumes READ COMMITTED and does not pin it; put_create_race fails under a repeatable read default
Maintainer thường phản hồi trong vòng 2 ngày
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
- 55/100
Hướng nghiên cứu
Start with crates/storage-postgres/tests/put_create_race.rs and reproduce the failure using PostgreSQL configured with default_transaction_isolation='repeatable read'; compare with the default setting. Then trace pool creation in PostgresEngine::new and data path transaction starts, using backup_engine.rs and data/transactions.rs as examples of explicit isolation levels. Done when the race tests pass under both settings and the required isolation behavior is documented or enforced.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The PostgreSQL backend's data path assumes READ COMMITTED and does not set it. On a server whose default_transaction_isolation is repeatable read, crates/storage-postgres/tests/put_create_race.rs fails 9 of 9 on main 744ea291 with Internal("error returned from database: could not serialize access due to concurrent update") (SQLSTATE 40001) from the put path, where a READ COMMITTED server passes all nine.
Measured 2026-10-25 on pgvector/pgvector:pg16 started with -c default_transaction_isolation='repeatable read'; the same tests pass on the same image with the default setting.
Cause
PostgresEngine::new builds both pools with PgPoolOptions::new().connect(...) and no isolation setting, and the data-path transactions open with pool.begin(). The setting is operator-reachable from the connection string (options=-c default_transaction_isolation=...), ALTER DATABASE, ALTER ROLE and postgresql.conf. The crate does pin a level where it wants one (begin_with("BEGIN ISOLATION LEVEL REPEATABLE READ READ ONLY") in backup_engine.rs and data/transactions.rs), and #569 pins READ COMMITTED on update_table's transaction, so the mechanism is there; the rest of the control plane and the data path inherit the default.
Under REPEATABLE READ the create-race retry (an INSERT ... ON CONFLICT loser re-reading the winner's row) and every SELECT ... FOR UPDATE after a prior statement in the same transaction see the first statement's snapshot, and a row committed after it raises 40001 instead of being re-read, which the engine answers as a 500.
Fix shape
Either pin READ COMMITTED once per connection (after_connect on the pool running SET default_transaction_isolation = 'read committed'), which covers every transaction the crate opens, or open each transaction with begin_with("BEGIN ISOLATION LEVEL READ COMMITTED"). The pool hook is one place; state in the operator docs that the backend requires it. A CI job variant that starts the container with repeatable read would pin it.
- 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ự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dsx-ai-factory/infra-controller#8341 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement triage:deciding
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
open-telemetry/otel-arrow#4540 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
component:benchmark
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
agentic-os-org/ANOLISA#9177 ·
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
oracle/rust-oracledb#61 ·
-
bug priority-medium to-agent
Độ 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