On Thu Jan 11 13:37:26 2024 +0000, Giovanni Mascellani wrote:
This only works as far as you keep this "experimental mode" in which you nuke the universe as soon as you find a collision. As soon as you want to fix that, the RB tree comparison function must be aware of the full key as well.
I don't think it does? _put / _get compare the key (as mentioned in the other comment, the idea is to load *payload from disk once the hash matches). There's a return value for hash collisions.
The "nuke the universe" aka exit(1) is there because I haven't yet seen a hash collision with the 64 bit hashes nor been able to produce one on Windows (and if we manage to deliberately produce one something is really wrong). I did see the exit(1) triggered due to bugs in my code though, e.g. incorrectly loading data from disk etc. So it did catch bugs by being noisy. I don't intend to have this in a non-draft MR though, just a loud FIXME.