An idle partition's active segment never seals, so its data never expires
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Read Segment::is_expired in core/partitions/src/segment.rs, remove_sealed_segments_up_to in core/partitions/src/iggy_partition.rs, and the tiered storage RFC section linked in the issue. The issue leaves the solution open and describes why independent replica timers break segment placement, so first work out how a replicated RollSegment operation fits the existing control path. Done means idle active segments can seal without new batches and then participate in retention, compression, and offloading.
索引モデルが issue の本文から書いたものです。
説明
Description
A partition that stops receiving messages keeps its active segment open forever, and retention only ever acts on sealed segments. Segment::is_expired returns false for anything unsealed (there is a test for it unsealed_segment_is_never_expired), and remove_sealed_segments_up_to skips the active segment. So an idle partition holds that segment's data indefinitely, no matter what message_expiry or max_topic_size say. Segments it sealed before going idle still expire normally; it is the final partly filled one that never becomes eligible.
This came out of the discussion in #4402, which proposes a time ceiling on a segment's span but evaluates it on append and scopes idle partitions out. That split is the reason for a separate issue: a partition that still receives messages will eventually evaluate a trigger, whether that trigger is the current size check or a time check. A partition receiving nothing never evaluates one at all.
Where it shows up:
- a decommissioned topic leaves every partition sitting on a partly filled segment that never seals and never expires
- the same happens inside a live topic when traffic skews, since a partition that stops receiving keys is idle whether or not the topic is
- an unsealed segment also cannot be compressed or offloaded, so this blocks tiering for those partitions
Affected area / component
Iggy server
Proposed solution
Left open.
Whatever closes this has to fire without an arriving batch, so it cannot be evaluated in the append path. The candidate raised in the tiered storage RFC is a replicated time roll: the primary appends a RollSegment control operation and every replica seals at that operation.
Alternatives considered
- Each replica rolling on its own timer. This does not work: segment boundaries have to be a function of the batches, and
SegmentState::reserveruns on every replica, so a localnow()would place the same batch differently on different replicas and fail the placement check invalidate_segment_prefix.
Contribution
- I'm willing to submit a pull request to implement this feature
Good first issue
- I think this could be a good first issue for a new contributor
- 主要言語
- Rust
- スター
- 5.2k
- フォーク
- 502
- 平均マージ
- 3日 3時間
- マージ済み PR(30日)
- 163
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/iggy のほかの issue
-
Go examples: add a message envelope producer and consumer対応中かも @ThunderGod77 が 4 日前に担当しました。 オープンgo good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/iggy#4694 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
HTTP client treats a consumer group as a plain consumer対応中かも @mohitduhan19 が 22 日前に担当しました。 オープンbug rust server
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Add the fail-fast connection option to the Rust and Python quick-starts対応中かも @QIW9 が 9 日前に担当しました。 オープンdocs good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
ResourceNotFound from the binary protocol prints an empty key対応中かも @xalestar が 1 日前に担当しました。 オープンapi python rust
apache/iggy#4767 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Node SDK: send accepts malformed user headers that fail during polling対応中かも @Subham-KRLX が 2 日前に担当しました。 オープンbug good first issue javascript
apache/iggy#4750 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug i18n priority: medium ui
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
storytold/craft-anything#983 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pbakaus/impeccable#1328 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Dinnerbone/Rascal#91 · リアクション 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
higress-group/HiRoute#405 ·
メンテナーはふだん 1 日以内に返信