SessionPool acquire: growth/hand-out failures bypass acquire_timeout budget; live counter decremented outside the state lock loses Condvar wakeups; acquire_timeout = Duration::MAX panics
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
- 62/100
Hướng nghiên cứu
Bắt đầu bằng việc xác định SessionPool::acquire và lần theo đường đi tăng trưởng của open_session cũng như đường đi replay USE của hand_out, sau đó kiểm tra mọi thay đổi của live liên quan đến state lock và thông báo Condvar. Xác minh rằng các lỗi được thử lại cho đến deadline ban đầu, các lần giảm live thông báo cho các waiter dưới lock, và việc chờ với Duration::MAX không gây tràn số; tái hiện hành vi này bằng các bài kiểm thử stress với fake-listener.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Three related pool-accounting defects found by stress-testing SessionPool against fake listeners:
acquire()spends none of itsacquire_timeoutbudget when the growth branch fails. Whenopen_session()fails,acquire()returns the error immediately (measured 198us against a 5s budget; 4136 of 4800 acquires failed instantly under stress while sessions were circulating). The same happens when theUSEreplay inhand_outfails — it discards the remaining idle candidates instead of retrying the loop.liveis decremented outside thestatelock at several sites, and the decremented value is exactly the predicate parked waiters re-evaluate, so Condvar notifications can be lost. The comment "Only mutated while holdingstate" no longer matches the code. Measured stalls trackacquire_timeoutexactly (300ms → 305ms, 1000ms → 1.005s).acquire_timeout = Duration::MAXpanics onInstant::now() + acquire_timeoutoverflow before the lock is taken. There is no "never time out" option, andDuration::MAXis the natural way to ask for one.
Fix: on growth/hand-out failure, re-take the lock, decrement live under it, notify, and continue the loop (bounded by the original deadline); use a saturating deadline (checked_add) so Duration::MAX means "wait without timeout".
- Ngôn ngữ chính
- Rust
- Star
- 1
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 apache/iotdb-client-rust
-
Session::open does not fail over when openSession/requestStatementId fails (only TCP-layer failover) Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
apache/iotdb-client-rust#10 ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Tất cả issue của apache/iotdb-client-rust
Issue tương tự
-
bug github_actions
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
registrystack/registry-stack#1393 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
rocky-data/rocky#2181 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Đang mởbot:ai-assisted component:indexer QA-roadmap status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
midnightntwrk/midnight-indexer#1557 ·