Controller endlessly creates BEST_POSSIBLE znodes during WAGED migration
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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- distributed-systems
Hướng nghiên cứu
Bắt đầu với các bước tái hiện và mã kiểm thử trong https://github.com/GrantPSpencer/helix/pull/45. Theo dõi emergencyRebalance, _assignmentManager.getBestPossibleAssignment, WagedRebalanceUtil.calculateAssignment và _assignmentMetadataStore.asyncUpdateBestPossibleAssignmentCache qua luồng di chuyển WAGED. Hoàn tất có nghĩa là quá trình di chuyển không hợp lệ không còn kích hoạt lại việc rebalance và không tạo BEST_POSSIBLE znodes vô hạn; rebalance phải thất bại như mô tả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Under specific circumstances, WAGED migration will cause the controller to endleslly write a new znode under BEST_POSSIBLE.
To Reproduce
Some test code to reproduce the issue:
https://github.com/GrantPSpencer/helix/pull/45
- Have CRUSHED resources
- Disable a node's partition on all instances in the cluster (essentially making no valid assignment)
- Switched to WAGED
- Observe Behavior
Expected behavior
Rebalance should fail and new best possible nodes should not be endlessly created
The fix is not straight forward. See below for my thoughts on what triggers this. I think the true solution for this might be to have partialRebalance correctly fail to generate a mapping, rather than tweaking our persist assignment logic.
Additional context
Say we have resource_0 and resource_1, both currently using CRUSHED. We have disabled resource_0's only partition on all instances in the cluster. The current state will be offline for all nodes for resource_0 while using CRUSHED. Then we switched the resource to WAGED:
WAGED rebalancer's emergencyRebalance _assignmentManager.getBestPossibleAssignment(, which looks at the in-memory (or zk-stored) assignment and fills in any missing resources with the current states (resource_0 still has all OFFLINE for current states)
A best possible with resource_0 and resource_1's current states are stored in ZK and memory.
We then trigger a partial rebalance. When partialRebalance calls WagedRebalanceUtil.calculateAssignment it is passing in a clusterModel that has removed resource_0 from the replica map so toBeAssignedReplicas does not include resource_0. It then produces a result it sees as valid that only includes resource_1. We then call _assignmentMetadataStore.asyncUpdateBestPossibleAssignmentCache which stores the result in memory and triggers an onDemand rebalance.
We start the onDemand rebalance and our in-memory best possible only has an assignment for resource_1. In emergency rebalance, emergencyRebalance once again calls _assignmentManager.getBestPossibleAssignment( and it takes the best possible that only has resource_1 and fills in the blanks for resource_0 by combining it with the current state, so it creates a new map with assignments for resource_0 and resource_1 where all resource_0 assignments are offline.
We then call persistBestPossibleAssignment, which writes the mapping to zookeeper and stores it in memory.
We then do another partial rebalance, which computes a mapping with only resource_1, persists that into memory, and triggers an onDemand rebalance. I believe this will occur endlessly until a node goes down, which leads to calling calculateAssignment( instead of getBestPossibleAssignment( and persist an assignment that only includes resource_1 to Z (rather than just in memory previously)
- Ngôn ngữ chính
- Java
- Star
- 505
- Fork
- 258
- Merge trung bình
- 4 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không 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 apache/helix
-
Four TestConstraintBasedAlgorithm tests pass when nothing is thrownCó thể đã có người làm @sharanggupta đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Helix ZkClient times out after successful ZooKeeper SASL DIGEST-MD5 authenticationCó thể đã có người làm @adityaanikam đã nhận 43 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
NPE in canCompleteSwap if path doesn't existsCó thể đã có người làm @waterWang đã nhận 106 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 50/100
-
Legacy IZkStateListenerI0ItecImpl causes zombie participants by discarding session IDsCó thể đã có người làm @LZD-PratyushBhatt đã nhận 457 ngày trước. Đang mởbug
Độ 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 35/100
Issue tương tự
-
bug documentation good first issue help wanted priority low size XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
martin-francois/symphony-trello#1351 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add test coverage for ConvertUtil.parseDate() with NULL inputCó thể đã có người làm @mirajul-mollah7 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
eclipse-sw360/sw360#4792 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/aws-emulator#30 · 1 bình luận ·
-
Độ 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
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100