The list group covers RPUSH/LPUSH/LPOP/RPOP/LRANGE/LLEN/LINDEX/LINSERT/LREM/LPOS/LMOVE/RPOPLPUSH today, but there is no benchmark exercising LSET. Grepping the spec directory:
$ grep -rliE '\blset\b' redis_benchmarks_specification/test-suites/
(no results)
LSET is the canonical "in-place element replacement" command on a list, and its implementation in t_list.c:lsetCommand runs an encoding-conversion call on every invocation (listpack ↔ quicklist), so its per-op cost is non-trivial and a regression in that path is currently invisible to the suite.
Suggested coverage, in increasing scope:
- Mid-sized listpack, LSET in place — replace at index 0 with a same-sized small value. Covers the "no encoding change" hot path on listpack.
- Listpack growing into quicklist on LSET — replace a small element with a value above
list-max-listpack-size (default −2, so ~8 KiB), forcing a one-shot conversion. Covers the GROWING branch.
- Quicklist LSET with potential shrink — pre-load a quicklist (large value or many elements), then LSET-in a small value to exercise the SHRINKING branch in
listTypeTryConversion.
A natural shape for (1) would mirror the existing memtier_benchmark-1key-list-100-elements-lrange-all-elements-pipeline-10-style spec but use --command "LSET __key__ __key__ __data__" instead of LRANGE. Suite-wide, three specs at typical priorities should be enough to land LSET in the regular CE-Performance run.
Happy to follow up with the YAML if helpful.
The
listgroup covers RPUSH/LPUSH/LPOP/RPOP/LRANGE/LLEN/LINDEX/LINSERT/LREM/LPOS/LMOVE/RPOPLPUSH today, but there is no benchmark exercising LSET. Grepping the spec directory:LSET is the canonical "in-place element replacement" command on a list, and its implementation in
t_list.c:lsetCommandruns an encoding-conversion call on every invocation (listpack ↔ quicklist), so its per-op cost is non-trivial and a regression in that path is currently invisible to the suite.Suggested coverage, in increasing scope:
list-max-listpack-size(default −2, so ~8 KiB), forcing a one-shot conversion. Covers the GROWING branch.listTypeTryConversion.A natural shape for (1) would mirror the existing
memtier_benchmark-1key-list-100-elements-lrange-all-elements-pipeline-10-style spec but use--command "LSET __key__ __key__ __data__"instead of LRANGE. Suite-wide, three specs at typical priorities should be enough to land LSET in the regular CE-Performance run.Happy to follow up with the YAML if helpful.