Revisit acceptable snapshot threshold for joiners
Maintainer thường phản hồi trong vòng 1 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
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- cpp
- Lĩnh vực
- distributed-systems, security
Hướng nghiên cứu
Bắt đầu trong node_state.h tại find_local_startup_snapshot() và theo dõi cách giới hạn độ cũ của snapshot và verify_snapshot() được áp dụng khi previous_service_identity không tồn tại. So sánh điều này với đường dẫn fetch sử dụng join_config.service_cert và logic retry hiện có. Hoàn tất khi joiner chỉ chấp nhận snapshot được lưu giữ cục bộ từ service hiện tại, đồng thời chuyển sang các retry fetch và join hiện có khi điều kiện đó không được đáp ứng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
We currently allow joiners to use a snapshot from a predecessor service, without checking the signature on that snapshot, and then relying on later checks (and potentially waiting until consensus, for the merkle checks in signature verification) to recognise it was a legitimate place to start.
Sketching a timeline:
- Service A
- Node A.p
- Writes transactions 1 through 500
- Creates and writes `snapshot_495_500.committed`
- Dies
- Service B
- Node B.r
- Trying to recover from service A
- Finds `snapshot_495_500.committed` locally
- Confirms `snapshot_495_500.committed` was signed by A
- Recovers from `snapshot_495_500.committed`
- Writes `service_identity = B` in transaction 501
- Completes recovery and opens
- Writes transactions 501 through 600
- Node B.j
- Tries to join Service B (with no knowledge of A)
- Finds `snapshot_495_500.committed`
- Doesn't verify the signature on `snapshot_495_500.committed`
- Starts from `snapshot_495_500.committed`
- Submits a join request, is accepted
- Receives 496 through 600 via consensus
There's a risk that if Node B.j for some reason found a snapshot from a different service X (in practice, this is most likely to be some failed recovery B', but for these purposes its equivalent to a totally unrelated service), it doesn't recognise that until the last step here fails.
Specifically, in the code:
node_state.h : find_local_startup_snapshot()
for (const auto& [snapshot_seqno, snapshot_path] : committed_snapshots)
{
...
try
{
verify_snapshot(segments, config.recover.previous_service_identity);
}
NB: for a joiner, config.recover.previous_service_identity is std::nullopt.
This is specifically when looking for a local/already-held snapshot. The fetch path is different and always calls verify_snapshot(segments, join_config.service_cert); (ie - "the snapshot you[service] served me better be signed by you[service]").
We think we can improve this, by raising the lower-bound that the join-target uses to decide whether a joiner's startup seqno is "recent enough". Specifically, where we currently have a bound on "how many snapshots in the past" they may be, we should also require that this is a snapshot from the current service. This should be cheap to apply, falling back to the existing retry logic for fetches and joins if it fails. This may introduce a slight delay after recovery, where joiners must wait for a snapshot to be created before they can fetch it and join, but ensures they can locally verify that snapshot, and we never proceed with unverified contents.
- Ngôn ngữ chính
- C++
- Star
- 876
- Fork
- 260
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 163
Chuẩn bị môi trường
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 microsoft/CCF
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Retirement helper masks NodeNotRetiredCommitted after an election as an invalid transaction IDĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
microsoft/CCF#8439 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/CCF
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Icinga/icinga2#11058 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
component: split-view platform: windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
zen-browser/desktop#15616 · 1 reaction ·
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 82/100
-
area/ysql kind/bug priority/medium status/awaiting-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
yugabyte/yugabyte-db#34415 ·
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 86/100
WayfireWM/wayfire#3148 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày