Regeneration of DISABLE operations when setting instance operations

オープン
#3,045 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java

調査の方向性

getActiveInstanceOperation() と getInstanceOperation() から始め、setInstanceOperation API を介して 2 つの EVACUATE リクエストを再現し、ZooKeeper のインスタンス設定を調査します。レガシーフィールドで HELIX_ENABLED=false の場合に EVACUATE が新しい DISABLE 操作を引き起こす理由を追跡します。繰り返し実行した EVACUATE 操作によって DISABLE タイムスタンプや LEGACY_DISABLED_TYPE エントリが再生成されなくなり、インスタンスの遷移が正常に進むことを確認できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Java
スター
505
フォーク
258
平均マージ
4日 20時間
マージ済み PR(30日)
3

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/helix のほかの issue

apache/helix の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。