graphprotocol / graphprotocol/graph-node
Make queries deterministic when using read replicas
まだ誰も着手していません。
- 主要言語
- Rust
- スター
- 3.2k
- フォーク
- 1.1k
- 平均マージ
- 4日 1時間
- マージ済み PR(30日)
- 1
説明
When graph-node uses a shard that has asynchronous read replicas, query results are not deterministic because the read replicas can trail behind the main database, usually up to 30s.
When we execute a GraphQL query, we determine the block at which to execute by looking at the main database; fetching the data for the query result might be done against one of the read replicas which can lag behind the main database, and so even though we claim that the query was executed against block 100, the data that we use for the result might only be up to block 99.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、メインデータベースでのブロック選択から、shard および read-replica からの取得まで、GraphQL クエリの実行を追跡します。read-replica が選択されたブロックより 1 ブロック以上遅れているケースを再現し、そのうえで、報告されるブロックと返されるデータの整合性を維持する動作を定義してテストします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- graphql, rust
- 領域
- backend-api-design, databases, distributed-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100