When I try saving following document, the value gets modified to 12399999999999124.
This happens when creating a document through the console also, that is when I realized this post belongs in Couchbase Server topics, not Java sdk topics.
Some interesting notes on the numbers I tried:
12399999999999123 saved as 12399999999999124
12399999999999124 saved correctly as is
12399999999999125 saved as 12399999999999124
12399999999999126 saved correctly as is
99999999999999999 saved as 100000000000000000
I am using Couchbase server 2.5.
I did not find any known issue when searching for this. Has anyone seen this behavior before?
Maybe your application should serialize numbers to strings and use BigInteger(String val) to decode them back, if it is very sensitive.