Support MGETBIT to return multiple bits.#2958
Support MGETBIT to return multiple bits.#2958MasahikoSawada wants to merge 3 commits intoredis:unstablefrom
Conversation
|
This changes the return type of GETBIT and is thus breaking. Is it really necessary? |
|
When we want fetch multiple bits, this feature would be useful for users.
it's better to add new command like GETBITS separatly? |
|
+1 for the feature though not reviewed the PR yet. The use case in the real world maybe like this: Suppose item ids Without the feature, I have to call I can also use
9 guys +1'ed for this! BTW, a spare bitmap(https://github.com/antirez/redis/issues/271) would be preferred in the use case I just mentioned, but the data struct behind getbit is bitmap. ;( |
|
I'm not sure that is a good use-case example; in the real world, a "list of |
|
@mgravell is unlikely to be contiguous Definitely! That's quite a bad example and I've updated my reply. Thanks for your advice. |
|
Another use case is for bloom filters: https://github.com/erikdubbelboer/redis-lua-scaling-bloom-filter |
|
Thank for showing use cases. |
MGETBIT command gets multiple bits. The syntax is, MGETBIT key offset1 offset2 ... offsetN
|
I've changed its design to adding MGETBIT command, in order to keep the return type GETBIT command. MGETBIT command gets multiple bits like, Please take a look. |
|
Hello, by using the new |
The syntax is GETBIS key offset [range].
The result are;
Please give me feedbacks.