Details
-
Task
-
Resolution: Fixed
-
Major
-
None
-
None
-
1
Description
The "txdata" parameter send on transactional KV operations is encoded as:
{"kv":true, "cas":123456, "txnMeta":....} |
But CAS is a long (int64) field, for which JSON serialisers and deserializers notoriously have poor support.
(Note https://tools.ietf.org/html/rfc7159#section-6: "numbers that are integers and are in the range [-(2*53)+1, (2*53)-1] are interoperable")
In Couchbase it's very common practice to encode int64s as strings to avoid this problem. E.g. "123456" or "0x123456".
We can't guarantee that every SDK will be able to encode CAS as a number correctly due to underlying platform issues (e.g. Node.js won't be able to), so please convert this field to a string.