-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
What's wrong with tostring:
tarantool> tostring(922337203685477580LL)
---
- 922337203685477580LL
...
tarantool> tostring(922337203685477580ULL)
---
- 922337203685477580ULL
...
Possible consequences:
tarantool> box.space.test:insert({922337203685477580LL})
---
- [922337203685477580]
...
tarantool> tostring(box.space.test:get({922337203685477580LL})[1])
---
- 922337203685477580ULL
...
Hashes calculated for "922337203685477580ULL" and "922337203685477580LL" are different. This could lead to some unexpected results for users. (I understand that tarantool internally uses msgpuck that stores any positive integer as unsigned)
Without breaking of backward compatibility I suggest to introduce new hash function that will be stable for such cases. Or at least document such behaviour.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working