[Bug]: Fauxton silently corrupts integers larger than `Number.MAX_SAFE_INTEGER`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
Research direction
Reproduce the issue using the provided document and save it through the Fauxton Web UI, then inspect the document editor and its JSON parsing or serialization path. Done means reopening and fetching the document preserves 9223372036854775807 exactly; add or run coverage for the reported large-integer case if the relevant Fauxton tests are located.
Written by the indexing model from the issue text.
Description
Version
3.3.3
Describe the problem you're encountering
Documents containing integers larger than JavaScript Number.MAX_SAFE_INTEGER are stored correctly by CouchDB itself.
However, when such a document is opened and saved through the Fauxton Web UI, the integer is silently rounded/truncated due to JavaScript number precision limits, corrupting the document.
Expected Behaviour
The integer value should remain unchanged after editing/saving via Fauxton.
Steps to Reproduce
- Insert a document containing a large integer:
{
"_id": "large-int-test",
"hugeNumber": 9223372036854775807
}
- Open the document in Fauxton.
- Save the document.
- Fetch the document again.
Actual Result
{
"_id": "large-int-test",
"_rev": "1-242234d64bf45499ef1d622e1a0f8237",
"hugeNumber": 9223372036854776000
}
Your Environment
No response
Additional Context
No response
- Dominant language
- Erlang
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 18
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/couchdb
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
apache/couchdb#6139 · 1 comment ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
apache/couchdb#6132 · 3 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
apache/couchdb#6120 · 4 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
apache/couchdb#6118 · 7 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
melgarafael/DeskcommCRM#1998 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Add: Mooz RetroOpenchannels:add check:passed
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 2 days
-
doctor integrity sample scans soft-deleted pages on Postgres (batch path has no deleted_at filter)Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day