datastore-idb .query doesn't work as expected

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

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

  • #7 @achingbrain による — マージされずにクローズ

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
typescript
領域
databases

調査の方向性

まず、store.query とその IndexedDB トランザクションおよびカーソルのライフサイクルを追跡します。次に、リンクされた idb トランザクションのライフタイムに関する説明を確認し、その後、返された結果の間で非同期処理を行う query consumer を再現します。非アクティブなトランザクションによる DOMException で query の反復処理が失敗しなくなれば完了です。

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

説明

kind/bug

store.query opens an IndexedDB transaction and uses a cursor to iterate over each entry in the datastore. The transaction closes automatically when the microtask queue is emptied and there's no outstanding work for it to do, even if the cursor is not at the end of the dataset.

Each query result is yielded to the caller which if they do any async work can cause the transaction to close and the next call to cursor.continue() to throw ERROR: DOMException{stack: 'Error: Failed to execute 'continue' on 'IDBCursor': The transaction is not active..

https://www.npmjs.com/package/idb/v/5.0.2#transaction-lifetime

主要言語
TypeScript
スター
39
フォーク
28
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

ipfs/js-stores のほかの issue

ipfs/js-stores の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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