Add listpack ZINCRBY coverage (1M small sorted sets, same-member increment)#401
Open
fcostaoliveira wants to merge 1 commit into
Open
Add listpack ZINCRBY coverage (1M small sorted sets, same-member increment)#401fcostaoliveira wants to merge 1 commit into
fcostaoliveira wants to merge 1 commit into
Conversation
…r increment) Existing zincrby coverage (memtier_benchmark-1key-zincrby-1M-elements-pipeline-1) is skiplist+hashtable-encoded; there is no coverage for the listpack-encoded same-member ZINCRBY update path in zsetAdd() (find -> delete old (member,score) -> reinsert). This adds a 1M-key spec, each key a 16-member listpack-encoded sorted set, ZINCRBY -P 10 on an existing member, to exercise that path on small sorted sets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our current ZINCRBY coverage (
memtier_benchmark-1key-zincrby-1M-elements-pipeline-1) runs against a single 1M-element skiplist+hashtable-encoded sorted set. There is no coverage for the listpack-encoded small-zsetZINCRBYupdate path — the find → delete old(member,score)→ reinsert sequence inzsetAdd()for sets withinzset-max-listpack-entries.This adds
memtier_benchmark-1Mkeys-zincrby-16-elements-listpack-pipeline-10: 1,000,000 keys, each a 16-member listpack-encoded sorted set, repeatedlyZINCRBY -P 10on an existing member. It scales out the small-listpackZINCRBYworkload reported in redis/redis#15288 (single-member increment) across 1M keys to avoid single-key cache-hot artifacts, giving server-class coverage for the listpack same-member update path.Encoding is pinned via
zset-max-listpack-entries 128/zset-max-listpack-value 64; 16 members per key stays comfortably listpack.Note
Low Risk
Only adds a benchmark YAML definition; no application or Redis server code changes.
Overview
Adds a new memtier benchmark suite
memtier_benchmark-1Mkeys-zincrby-16-elements-listpack-pipeline-10so CI can stressZINCRBYon listpack-encoded sorted sets (16 members per key, 1M keys), withZINCRBY -P 10on an existing member.The suite preloads via
ZADD, pins listpack encoding withzset-max-listpack-entries/zset-max-listpack-value, and targets the same-member update path inzsetAdd()that priorZINCRBYcoverage on a single huge skiplist zset did not exercise. It is meant to catch regressions like those discussed in redis/redis#15288 without single-key cache-hot bias.Reviewed by Cursor Bugbot for commit 2f86487. Bugbot is set up for automated code reviews on this repo. Configure here.