pub struct Limits {
pub max_listpack_entries: usize,
pub max_listpack_value: usize,
}Expand description
Where the encoding changes over.
These are hash-max-listpack-entries and hash-max-listpack-value, runtime
configuration in Redis, so they are passed in rather than being constants.
The value limit applies to a field name and to a value alike, which is what
hashTypeTryConversion does.
Fields§
§max_listpack_entries: usizeAt this many fields a hash stops being a listpack.
max_listpack_value: usizeA field or a value longer than this cannot go in a listpack.
Implementations§
Source§impl Limits
impl Limits
Sourcepub const DEFAULT: Limits
pub const DEFAULT: Limits
Redis’s defaults: 512 and 64.
The count is 512 and not the 128 everyone remembers, and everyone
remembers 128 because that is what it was for years. Read off a running
8.10.1 with nothing in its config file rather than off the documentation,
which is the only way to be sure of a number like this. It matters
because a hash of two hundred fields answers listpack there, so it has
to answer listpack here too.