Preserve input instance order for zone_based stoppable check

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

@LZD-PratyushBhatt がすでに取り組んでいます。

2025年4月30日 から。

  • #3 @LZD-PratyushBhatt による — オープン
  • #3029 @LZD-PratyushBhatt による — オープン

評価

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

調査の方向性

まず、zone_based の stoppable チェックを通じて getZoneBasedInstances() を追跡し、関連する REST API のエントリーポイントを特定します。preserveOrder=true と preserveOrder=false の場合の動作を後方互換性も含めて確認し、その後、順序に関する保証を説明するようドキュメントを更新します。

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

説明

Currently, getZoneBasedInstances() which zone_based check calls internally uses a TreeSet, which leads to lexicographical sorting of instances during the stoppable check. This behavior results in the output instance order being different from the input list, even when multiple instances are equally stoppable.

This issue proposes to make the ordering deterministic based on user input, by introducing a new boolean parameter preserveOrder to facilitate preserving order for zone based checks and relevant REST API changes.

When preserveOrder is set to true, the original order of the input list will be preserved.

Default behavior (preserveOrder = false) will maintain backward compatibility for OSS users who may rely on the current output order.

This change aims to improve predictability in testing and usage scenarios where instance order matters. We'll ensure this behavior is clearly documented to avoid incorrect assumptions.

主要言語
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 を短くまとめたダイジェスト。