Closed rizqme closed 3 years ago
It looks like an issue with JSON encoder
Ok, it seem to work with int32BE encoder. perhaps I will PR some documentation regarding atomic operation
Yeah - the atomic add / sub / etc operations require data to be encoded using raw bytes, not JSON. Eg from the python documentation:
The integers to be added must be stored in a little-endian representation. They can be signed in two’s complement representation or unsigned. You can add to an integer at a known offset in the value by prepending the appropriate number of zero bytes to param and padding with zero bytes to match the length of the value. However, this offset technique requires that you know the addition will not cause the integer field within the value to overflow.
Its a good idea to make this clearer in the documentation.
Hi, when I try to use add for counting I run to this issue that can be replicated as following:
It throws following error: