[COMPASS-3581] Messes up large numbers, when importing or inserting documents Created: 18/Apr/19  Updated: 29/Oct/23  Resolved: 18/Jun/20

Status: Closed
Project: Compass
Component/s: Atlas, Document Validation, Import/Export
Affects Version/s: 1.17.0-beta.5
Fix Version/s: 1.22.0

Type: Bug Priority: Critical - P2
Reporter: Jannis Rautenstrauch Assignee: Irina Shestak (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 16.04 (compass), Firefox 66.0.3 (Cloud)


Attachments: File compass_break.json    
Issue Links:
Backports
Duplicate
duplicates COMPASS-3806 Inserting or updating int64 data type... Closed
Problem/Incident
Related
is related to COMPASS-5127 Messes up large number when inserting... Open
is related to COMPASS-4342 Document is marked as modified when i... Closed
is related to COMPASS-4828 Document is marked as modified when D... Closed
Sprint: Iteration Dingo, Iteration Elderberry, Iteration Fig

 Description   

I think I found quite an important bug concerning large int64 numbers in mongoDB.

When I import json documents with large numbers, the numbers change*!*

For example, I have a file with the field, id: 964982886377099271, when I import the file with `Collection; Import Data; Json` this changes to id:964982886377099264. 
This example file is in the attachment. It also happens with other numbers of similar size.

The same also happens, when I press the `Insert Document` button inside of Compass.
I try to create an entry with id: 964982886377099271(Int64) and after I enter 96498288637709927 it changes to 96498288637709920 and then I enter 1 and it changes to 964982886377099264.

The same also applies, when I press the `Insert Document` button on cloud.mongodb.com.

I tried to find issues regarding the same topic, but could not find any. This bug is quite tremendous, when you insert some documents containing large numbers to mongodb and afterwards you use the numbers inside an application for some processing, the numbers you used in the processing could be wrong and therefore your processing is incorrect as well.

 

Best regards,
Jannis

 

 



 Comments   
Comment by Massimiliano Marcon [ 24/Apr/19 ]

Thank you for the report, we'll keep this in mind but we are not going to fix it at this time.

Comment by Jannis Rautenstrauch [ 19/Apr/19 ]

Just realized that the number is larger than the maximum value of int64. But then why does the other number (also larger than int64 max value) works? And a warning that the number is higher than the maximum value should be displayed.

 

Also happens with smaller numbers!

I could confirm the bug with numbers way smaller than the maximum value of int64: 9223372036854775 changes to 9223372036854776. Now trying to add more digits at the end will change the number with every digit entered.

Generated at Wed Feb 07 22:33:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.