Skip to content

Fixed bug concerning redis-benchmark non clustered benchmark forcing always the same hash tag {tag}#7931

Merged
oranagra merged 2 commits intoredis:unstablefrom
filipecosta90:redis.benchmark.stag
Oct 20, 2020
Merged

Fixed bug concerning redis-benchmark non clustered benchmark forcing always the same hash tag {tag}#7931
oranagra merged 2 commits intoredis:unstablefrom
filipecosta90:redis.benchmark.stag

Conversation

@filipecosta90
Copy link
Contributor

Following the issue described in #7930 , this PR fixes it by only including the hash tag placeholder when --cluster flag is passed.
Bellow is a quick example of the impact on a Redis Enterprise POC setup with 4 master shards.

current load pattern of redis-benchmark

image

fixed load pattern of redis-benchmark

image

argv[0] = "MSET";
const char *cmd_argv[21];
cmd_argv[0] = "MSET";
char* key_placeholder = sdscatprintf(sdsnew(""),"key%s:__rand_int__",tag);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oranagra as per the PR review, changed to cmd_argv and using only one key_placeholder ( freed on the end )

@oranagra
Copy link
Member

oranagra commented Oct 20, 2020

@filipecosta90 please see my commit.
apparently we don't have any test in our CI that checks that redis-benchmark works.
being caution, i cloned this branch and tested my fix...

@oranagra oranagra merged commit 6cf23d6 into redis:unstable Oct 20, 2020
oranagra added a commit that referenced this pull request Oct 27, 2020
…always the same hash tag {tag} (#7931)

Adding the ":{tag}" only if --cluster is used, so that when used against
a proxy it generates traffic to all shards.

Co-authored-by: Oran Agra <[email protected]>
(cherry picked from commit 6cf23d6)
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Nov 4, 2020
…always the same hash tag {tag} (redis#7931)

Adding the ":{tag}" only if --cluster is used, so that when used against
a proxy it generates traffic to all shards.

Co-authored-by: Oran Agra <[email protected]>
jschmieg pushed a commit to memKeyDB/memKeyDB that referenced this pull request Nov 6, 2020
…always the same hash tag {tag} (redis#7931)

Adding the ":{tag}" only if --cluster is used, so that when used against
a proxy it generates traffic to all shards.

Co-authored-by: Oran Agra <[email protected]>
(cherry picked from commit 6cf23d6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] redis-benchmark non clustered benchmark forces always the same hash tag {tag} which makes proxy setups to be limited by standalone performance

3 participants