[CURATOR-636] Make PersistentTtlNode initialDelay more configurable
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java
調査の方向性
PersistentTtlNode.java から始めて scheduleAtFixedRate の呼び出しを調査し、初回遅延と繰り返し周期が現在 ttlMs と touchScheduleFactor からどのように導出されているかに注目してください。このノードに設定がどこから渡されるかを特定し、そのうえで、keep-alive の周期が意図されたスケジュールを維持したまま、初回遅延を独立して制御できることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Currently when PersistentTtlNode starts, it will
- create a CONTAINER node
- create a CHILD node `_touch`
But there is a initialDelay between 1 and 2. If the initialDelay is long enough and the client is disconnected, 1 will not be deleted forever (because CONTAINER node only delete its parent when all its child is gone, but in this case, it never has any of them).
The initialDelay could be configured, but not so flexible. The initialDelay is calculated by the formula `ttl/touchScheduleFactor`, but this formula is also used to how frequent we want to ping Zookeeper to keep our znodes alive, aka period.
As you can see here (2nd parameter is initialDelay and 3rd parameter is for period)
| // PersistentTtlNode.java Future future = executorService.scheduleAtFixedRate(touchTask, ttlMs / touchScheduleFactor, ttlMs / touchScheduleFactor, TimeUnit.MILLISECONDS); // Interface ScheduledExecutorService ScheduledFuture scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) |
Let's say we have ttl of 5 minutes. We want to have 0 initialDelay so we will set the touchScheduleFactor to 5 minutes too. This will give us 1ms (5 minutes/5 minutes) of initialDelay (which solves our problem) but spamming Zookeeper every second.
So it would be nice if we can set `initialDelay`
Originally reported by yang-wei, imported from: Make PersistentTtlNode initialDelay more configurable
- status: Open
- priority: Minor
- resolution: Unresolved
- imported: 2025-01-21
- 主要言語
- Java
- スター
- 3.2k
- フォーク
- 1.2k
- 平均マージ
- 14時間 48分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/curator のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
Optimize storage for single-node CuratorCache対応中かも @waterWang が 63 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
TreeCache.iterator() throws NoSuchElementException after a parent node's last child is deleted対応中かも @apm1467 が 65 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
Add Jackson PolymorphicTypeValidator対応中かも @pjfanning が 15 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
Upgrade to Jackson 3オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
quarkiverse/quarkus-google-cloud-services#1188 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
opendataloader-project/opendataloader-pdf#851 ·
メンテナーはふだん 1 日以内に返信
-
Component: Frontend Component: Web Component Type: Maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
it-at-m/refarch-templates#1944 ·
メンテナーはふだん 2 日以内に返信
-
3.0.0-M*: every channel stays reachable from its session's KEX listeners, so a long-lived session leaks all closed channels対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信