Transaction mutations partially applied when TiKV nodes crashing?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- rust
- Lĩnh vực
- databases, distributed-systems
Hướng nghiên cứu
Bắt đầu với logs_adjusted.json và chuỗi giao dịch xung quanh lệnh gọi .commit() tại 2025-07-12T19:28:37.261, sử dụng các timestamp bắt đầu và commit được báo cáo cùng các thông báo của các node bị crash. Tái tạo workload bằng tikv-client 0.3.0 và TiKV 8.5.1, sau đó so sánh hành vi khi có và không có node bị crash. Hoàn tất có nghĩa là xác định liệu mutation bị thiếu là do Rust client hay cụm TiKV gây ra, đồng thời ghi lại các bằng chứng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Cluster version: 8.5.1
Client version:
name = "tikv-client"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "048968e4e3d04db472346770cc19914c6b5ae206fa44677f6a0874d54cd05940"
I have a workload where am ingesting lots of data into TiKV, one transaction after another in quick succession. In one transaction I write/delete many KVs, and in a later transaction (in this specific case ~24h later) I try to read one of the keys I wrote to but no value is found, and I did not do another operation to the key in between. Other keys I wrote within the transaction which wrote the missing KV are found. Some of the TiKV nodes are crashing around the time due to the heavy workload. The missing keys are not deterministic, but when we repeat the workload we again see cases where some writes or deletes within a transaction do not seem to be applied. When no nodes crash during the workload we don't seem to have the issue (could be coincidence).
.put(key)within transaction (default optimistic)- Begin committing transaction writing the KV
- 10-20 or so logs about connecting to specifically one of the nodes which is likely crashed/restarting, these 2 repeating:
tikv_client::pd::client[0m[2m:[0m connect to tikv endpoint: <node 0>
tikv_client::common::security[0m[2m:[0m connect to rpc server at endpoint: <node 0>
- Client returns the commit was successful
Not related to this specific transaction but to give some context on what else was happening: ~30 seconds later, a different transaction submitted later gets a failed to commit secondary keys due to TxnLockNotFound, but it was not the same transaction as the one which wrote the missing KV. ~2 mins after that we see a heart beat error for TxnNotFound. Then a transaction errors with gRPC api error: status: Cancelled, message: "Timeout expired", details: [], metadata: MetadataMap { headers: {} }.
Here are the logs from the cluster around (30s either side) the time I called .commit() on the transaction which was supposed to write this missing KV (I called commit at 2025-07-12T19:28:37.261):
The missing key was 03ee44790100f9465cf9b0426aa7020a0685c66bd10a859b78e2da1dea940ba5e113600083b37e051e0b67eb17348f48d3e6e6e8b009d8ea48854d721488667d6000000000029fd4fc727f8594309b02da47145f019993219e0db644bdfd81ea6890e0c717836bdc370000000000000001 and it was written in transaction with start ts (Timestamp { physical: 1752348517228, logical: 14, suffix_bits: 0 }) and commit ts Timestamp { physical: 1752348517328, logical: 35, suffix_bits: 0 }.
How do I go about debugging this, or what information can I provide to help? I'm not sure if this is client or something else.
- Ngôn ngữ chính
- Rust
- Star
- 434
- Fork
- 168
- Merge trung bình
- 4 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 tikv/client-rust
-
contribution
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
tikv/client-rust#546 ·
-
Disable TSO for raw clients?Đang mởcontribution first-time-contributor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
tikv/client-rust#531 · 1 bình luận ·
-
Resolve lock bugĐang mởcontribution first-time-contributor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
tikv/client-rust#528 · 4 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
tikv/client-rust#516 · 1 bình luận ·
-
Reverse scan fail to find key when range spans multi regionCó thể đã có người làm @lance6716 đã nhận 33 ngày trước. Đang mởcontribution first-time-contributor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
tikv/client-rust#512 · 5 bình luận ·
Tất cả issue của tikv/client-rust
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 64/100
storytold/designcraft#3477 ·
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 72/100
agent-labs-dev/mergeloop#374 ·
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 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:plugins kind:bug priority:p3 ready
Độ 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 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
quarto-dev/q2#1446 ·
Maintainer thường phản hồi trong vòng 1 ngày