[SERVER-26026] When entering a decimal value too big for Decimal128, the current error message could be more helpful Created: 08/Sep/16  Updated: 06/Dec/22  Resolved: 12/Sep/16

Status: Closed
Project: Core Server
Component/s: Usability
Affects Version/s: 3.4.0-rc0
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Edward M. Anderson Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Participants:

 Description   

While doing some lightweight testing of early 3.4 new features during the MongoDB Bug Hunt Meetup, I deliberately passed in increasingly large decimal numbers.

I was attempting to test:

  • Approximate max number of significant digits using new decimal feature
  • Appropriate error when number too large
  • Quality of error message

Decimal number were correctly saved until my number was too large and an error message appeared. This error message was, "Error: Input out of range of Decimal128 value (inexact)."

This error message makes it clear what the problem was. However, it could be more helpful. To figure out how many significant digits (34) are allowed in the Decimal128, I tried looking it up online and talking to a MongoDB engineer who was present. Including this information and/or the valid range in the error message would be very helpful.



 Comments   
Comment by Geert Bosch [ 15/Oct/16 ]

emaj4mongo, I might have misunderstood your request, as with increasingly large numbers and values "too big", I thought you noticed effects at the end of the exponent range (10**6144). However, if your suggestion is to just reword the message "Input out of range of Decimal128 value (inexact)" to something like "Input exceeds 34-digit Decimal128 precision (inexact).", that is a change we'd be happy to make.

Comment by Ian Whalen (Inactive) [ 12/Sep/16 ]

Hi Edward - thanks a lot for participating in the 3.4 Bug Hunt!

The error message you've pointed to is used for several different edge cases and it's not always trivial to catch the particular trigger condition. Since we're not likely to add the additional logic necessary to differentiate between these conditions we're going to close this as Won't Fix, but please do continue to hammer away at Decimal and any of the other 3.4 features.

Comment by Kelsey Schubert [ 09/Sep/16 ]

Hi emaj4mongo,

Thank you for participating in the MongoDB Bug Hunt and reporting this issue. I've marked this as an improvement request to be considered by our Integration team. Please continue to watch this ticket for updates.

Kind regards,
Thomas

Generated at Thu Feb 08 04:10:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.