Legacy IZkStateListenerI0ItecImpl causes zombie participants by discarding session IDs
@LZD-PratyushBhatt がすでに取り組んでいます。
2025年8月11日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- java
調査の方向性
レガシーの IZkStateListenerI0ItecImpl ラッパーと DedicateZkClient.handleNewSession を見つけ、次に ZkEventThread からキューに入れられたイベントがセッション ID を LiveInstance の処理に渡す流れを追跡します。2 つの偽のセッション ID で問題を再現し、各イベントが元のセッションコンテキストを使用し、ハンドラーがリセットされたままになったり、重複した LiveInstance インスタンスが作成されたりしないことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Helix participants can enter a "zombie" state where they appear healthy in ZooKeeper but are functionally disconnected from cluster operations, unable to process state transition messages. This occurs due to a critical flaw in the legacy compatibility wrapper IZkStateListenerI0ItecImpl that completely ignores session ID parameters when processing ZooKeeper session events.
When the single-threaded ZkEventThread becomes blocked (e.g., during long-running FINALIZE operations), multiple SyncConnected events accumulate in the event queue. Once processing resumes, these events are handled in FIFO order, but the legacy wrapper discards the original session ID from each queued event and falls back to using the current active session ID via getSessionId(). This causes session events originally queued for older sessions to be processed using the context of the most recent session, violating the intended event processing timeline.
The result is catastrophic: the first misprocessed event successfully creates a LiveInstance for the current session, but all subsequent events in the backlog attempt to create LiveInstances for the same current session and fail with "already has a live-instance" exceptions. Each failed attempt partially resets the participant's message handlers (setting _ready = false) but never completes the re-initialization process, leaving the participant in a broken state where it cannot process any state transition messages despite appearing active to the Helix controller.
To Reproduce
Create a DedicateZkClient, pass any fake sessionID in handleNewSession. It will totally discard that sessionID and will use the current active zk connection session ID and will all the processing based on that. Trigger another handleNewSession event with fake sessionID, it will fail to create liveinstance this time, and handlers will be kept in reset state.
Expected behavior
Session events should be processed with their original session context regardless of timing delays. The handleNewSession() method should receive and use the correct session ID that was active when the event was originally queued, ensuring proper FIFO event processing and maintaining participant message handling capabilities.
Additional context
Add any other context about the problem here.
- 主要言語
- Java
- スター
- 505
- フォーク
- 258
- 平均マージ
- 4日 20時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/helix のほかの issue
-
Four TestConstraintBasedAlgorithm tests pass when nothing is thrown対応中かも @sharanggupta が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
-
Helix ZkClient times out after successful ZooKeeper SASL DIGEST-MD5 authentication対応中かも @adityaanikam が 43 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
NPE in canCompleteSwap if path doesn't exists対応中かも @waterWang が 106 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 50/100
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
似ている issue
-
bug documentation good first issue help wanted priority low size XS
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
martin-francois/symphony-trello#1351 ·
メンテナーはふだん 1 日以内に返信
-
Add test coverage for ConvertUtil.parseDate() with NULL input対応中かも @mirajul-mollah7 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
eclipse-sw360/sw360#4792 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/aws-emulator#30 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100