Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running multiple commands with different types? #244

Open
chakaz opened this issue Dec 5, 2023 · 2 comments
Open

Running multiple commands with different types? #244

chakaz opened this issue Dec 5, 2023 · 2 comments

Comments

@chakaz
Copy link

chakaz commented Dec 5, 2023

Hello memtier experts!
I'd like to use memtier for running multiple commands using multiple data types (like SET, ZADD, LPUSH, etc). While memtier does support multiple --command arguments (which is awesome!), since keys use a common generation technique (like using --key-prefix), this can't be done, as the same key may once be used for SET and then randomly for ZADD, for example.
Is there a way that I'm missing to specify per-command key prefix, or some other way of getting this to work?

BTW, I'd also propose a way to generate random numbers (in addition to __key__ and __data_), as this may be useful for ZADD scores. Maybe __random__ or even better: __random__[0-100]?

Thanks in advance!

@YaacovHazan
Copy link
Collaborator

Hi @chakaz you are right, currently --key-prefix is shared between all the arbitrary commands.
Can --command-key-pattern=S (Sequential) help in your case? it will set a different key for each command?

Anyway, we will work to improve the --command option and will take your suggestion (__random__) into consideration.

@chakaz
Copy link
Author

chakaz commented Dec 5, 2023

Thanks for your quick reply!

Can --command-key-pattern=S (Sequential) help in your case? it will set a different key for each command?

I'm afraid not, as that will never create, for example, lists with 2 entries. Nor will it ever read from an existing list (again, example).

Anyway, we will work to improve the --command option and will take your suggestion (__random__) into consideration.

Awesome, thanks a lot!

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

No branches or pull requests

2 participants