durable-streams-rust: use the cold tier as the durable bulk store (make local per-stream files a non-durable read cache)

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
28/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
aws

調査の方向性

CARDINALITY_CLIFF_FIX.md と、--tier-* オプションで公開されている WAL checkpoint および cold-tier のエントリーポイントから始めます。tier のアップロード、WAL のリサイクル、リカバリ順序がどのように相互作用するかを、--tier-segment-bytes と --tier-compact-bytes も含めて追跡します。完了の条件は、リカバリと durability に関する未解決の問題が解決され、提案された cache-only のローカルファイルが O(N) の durability checkpoint を必要としなくなることです。

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

説明

Context

The write cardinality cliff is caused by the WAL checkpoint's O(N_touched) per-stream fdatasync storm (see investigation in CARDINALITY_CLIFF_FIX.md). The checkpoint exists only to make per-stream data durable so the WAL can be recycled.

Proposal

The server already has a cold tier (S3/MinIO segments, --tier-*). Make the local per-stream files a pure read cache, not a durability target:

  • Durability = WAL (recent) + cold-tier segments (bulk).
  • The WAL recycles once its records are persisted to the tier — which is already batched into bounded segments, i.e. O(segments) uploads/fsyncs, not O(streams).
  • Recovery = load tier state + replay the WAL tail. The per-stream local files are rebuilt lazily as a cache and never need a per-file fdatasync.

This deletes the O(N) checkpoint by reusing infrastructure that already exists, and fits the tiered architecture better than one-file-per-stream local durability.

Open questions

  • Is the cold tier currently authoritative enough for recovery (upload durability, ordering vs WAL recycle floor)?
  • Interaction with --tier-segment-bytes / --tier-compact-bytes cadence.

Alternatives tracked separately

  • Log-structured local store (#LOG_STRUCTURED_ISSUE).
  • Incremental/staggered checkpoint + --wal-checkpoint-syncfs (being prototyped now).
主要言語
TypeScript
スター
10.4k
フォーク
399
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

electric-sql/electric のほかの issue

electric-sql/electric の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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