Remove O(m) DB queries
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- typescript
- 領域
- api, databases, performance
調査の方向性
まず、Asset-type UTXO クエリ、アカウント集約、スナップショット作成、および web wallet や Hub が使用する API の Indexer エントリーポイントを特定します。これらのクエリが現在どのように結果を走査しているかを確認し、結果を上限付きのバッチで取得するために必要な API と consumer の変更を判断します。完了の条件は、1 回のリクエストですべての m UTXO を走査しないことです。
索引モデルが issue の本文から書いたものです。
説明
When querying UTXOs using Asset type, aggregating UTXOs by account, and creating a snapshot, the Indexer scans all the UTXOs that have a specific account or a specific asset type.
When a user opens a CodeChain web wallet, wallet requests the total amount of assets that the user has to the Indexer. Indexer sends a query that scans all the UTXOs that the user has. If the number of UTXOs that the user has is m, the upper bound of the query is O(m).
How to solve
Make APIs return sub results that read k rows in the DB. The Web wallet or Hub should request the maximum [n/k] number of API calls to get all the results. The upper bound of each query is O(k*log m). Then there won't be a single slow query that consumes all the resources(CPU, Memory, disk I/O) in the DB.
- 主要言語
- TypeScript
- スター
- 21
- フォーク
- 15
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeChain-io/codechain-indexer のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 45/100
-
maintenance
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
CodeChain-io/codechain-indexer の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
high priority
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
CI-CMG/deep-sea-corals-exb#84 · コメント 1 件 ·
-
Create/import wallet form shows raw "password must be at least 1 characters" instead of the translated message対応中かも @CapThunder19 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
joinmarket-webui/jam#1538 ·
メンテナーはふだん 1 日以内に返信
-
t0ggles
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nolimits4web/swiper#8240 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信