hot
hot copied to clipboard
Limitation of 255 key length
In real world KV applications keys are often less that 255 bytes, but some could run 512bytes to 1K range, for example, if it's the concatenation of several business keys.
What would it take to move the limit to 1K? And would it make sense to compress and/or provide the key as a bit string before calling insert/find?
- EliasFano compression for example is one of the options I've seen in this general area.
Or is 255 structurally determined by the HOT algorithm for other reasons?
- uint8 is used to store offsets of descriminative bits, this leads to the hard limit of 255 key length. If you change it to a large type, you may store longer keys.
- key compression is not available, because trie splits key and store prefixes top down through the tree structure. Compression will break the lookup logic.