Consider CAR-first reading

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
databases

調査の方向性

Start with src/db/car/many.rs at lines 226-239, where ParityDb is checked before the CAR files. Measure both lookup orders on snapshot export and RPC-serving workloads, including lock contention and relevant performance metrics. Done means deciding which approach should be the default, with any option to reverse it supported if the measurements warrant that.

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

説明

Type: Task

Summary

Right now we check ParityDb first, only then the CAR files.

https://github.com/ChainSafe/forest/blob/84b3faac005a6886eda0df9379c68f2aa80fffc5/src/db/car/many.rs#L226-L239

The issue is that this internally harasses an internal ParityDb RwLocks - 4 global ones and then some processing. Flipping it (and potentially replacing our RwLock with ArcSwap) could make the entire thing operate more smoothly with less lock contention. In theory this could make certain workloads slower (if operating purely on hot data); it's worth measuring on expected use-cases, e.g., snapshot export and RPC serving. Some additional metrics would be useful as well.

We could also have an option to flip back the behavior.

Completion Criteria

  • Decide whether ParityDb first or CAR-first approach is a better default.

Additional Links & Resources

主要言語
Rust
スター
700
フォーク
201
平均マージ
1日 17時間
マージ済み PR(30日)
65

環境構築

はじめの一歩

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

ChainSafe/forest のほかの issue

ChainSafe/forest の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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