Regeneration of DISABLE operations when setting instance operations

Đang mở
#3,045 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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 getActiveInstanceOperation() và getInstanceOperation(), sau đó tái hiện hai yêu cầu EVACUATE thông qua API setInstanceOperation và kiểm tra cấu hình instance trong ZooKeeper. Truy tìm lý do EVACUATE gây ra một thao tác DISABLE mới khi HELIX_ENABLED=false trong các trường legacy. Hoàn tất khi các thao tác EVACUATE lặp lại không còn tạo lại timestamp DISABLE hoặc các mục LEGACY_DISABLED_TYPE, và các quá trình chuyển trạng thái của instance diễn ra bình thường.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
Describe the bug

There is a bug in the instance operation handling logic that causes an infinite cycle of regenerated DISABLE operations when applying operations like EVACUATE to an instance with HELIX_ENABLED=false in legacy fields. This prevents proper instance lifecycle transitions and causes unexpected behavior in instance swapping scenarios.

To Reproduce
  1. Create an instance in the cluster.
  2. Set DISABLE operation with USER source:
    Apply to InstanceConf...
    curl -X POST "http://<host>:<port>/admin/v2/clusters/<cluster>/instances/<instance>?command=setInstanceOperation&instanceOperationSource=USER&instanceOperation=DISABLE"
  3. Set EVACUATE operation with AUTOMATION source:
    Apply to InstanceConf...
    curl -X POST "http://<host>:<port>/admin/v2/clusters/<cluster>/instances/<instance>?command=setInstanceOperation&instanceOperationSource=AUTOMATION&instanceOperation=EVACUATE"
  4. Set EVACUATE operation again with AUTOMATION source
  5. Check the instance configuration in ZooKeeper

After the second EVACUATE operation, a new DISABLE operation is generated with:

  1. Updated timestamp (more recent than the EVACUATE timestamp)
  2. Added LEGACY_DISABLED_TYPE field
  3. The cycle repeats with each subsequent evacuate operation
Expected behavior

The DISABLE operation should not be regenerated with new timestamps when setting a different operation. Instance operations should be updated consistently without creating an infinite cycle.

Additional context

RCA:
The regeneration happens because:

  1. getActiveInstanceOperation() returns the last operation (EVACUATE)
  2. EVACUATE is in INSTANCE_DISABLED_OVERRIDABLE_OPERATIONS
  3. This causes getInstanceOperation() to override it with a newly generated DISABLE operation
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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/helix

Tất cả issue của apache/helix

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.