microsoft / microsoft/ObjectStoreProvider

getAll and getRange count needs to be smaller than 2^32 -1

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15
Forks
19
PR merge metrics
No merged PRs in 30d

Description

if count is greater than 2^32, there will be error like this:
Failed to execute 'getAll' on 'IDBObjectStore': Value is outside the 'unsigned long' value range.

based on MDB doc, the supported count range is between 0 to 2^32 -1 (inclusive)
https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getAll#count

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the getAll and getRange entry points and compare their count handling with the supported 0 to 2^32 - 1 range described in the linked MDN documentation. Reproduce the reported error with an out-of-range count, then verify that the resulting behavior handles the documented limit without the unsigned-long range error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.