miniredis icon indicating copy to clipboard operation
miniredis copied to clipboard

Add support for Bloom Filter commands in miniredis

Open dhruv-raithatha opened this issue 8 months ago • 2 comments

Add support for Bloom Filter commands in miniredis

Description

First of all, thank you for maintaining miniredis! It's a fantastic tool for testing Redis interactions in Go projects.

I would like to request support for Bloom Filter commands, which are part of Redis' probabilistic data structures module (RedisBloom). These commands are particularly useful for scenarios involving approximate membership checks and are widely utilized in modern applications.

Commands Requested

Here are some essential Bloom Filter commands that would be beneficial to implement:

  • BF.RESERVE
  • BF.ADD
  • BF.MADD
  • BF.EXISTS
  • BF.MEXISTS
  • BF.SCANDUMP
  • BF.LOADCHUNK

Use Case

Including support for these commands would allow developers to test applications that rely on Bloom Filters without needing to spin up a full Redis instance. This would align with the primary purpose of miniredis as a lightweight Redis server for unit tests in Go.

Additional Context

If this feature aligns with the vision of the project, I would be happy to contribute or assist with implementation. Please let me know if there are any specific guidelines or constraints when adding support for new commands.

Thank you for considering this feature request!

dhruv-raithatha avatar Apr 12 '25 07:04 dhruv-raithatha

Hi! Thank you for opening an issue.

I see the BF.* commands are a module. Which we don't have yet, but would be fine to add (at least as long as it's added when Redis was still Open Source (<= 7.2.4)). But it's most likely to get added if you try it and make a PR. It doesn't have to be perfect, we're happy to help.

alicebob avatar Apr 18 '25 07:04 alicebob

Thanks @alicebob! I will try to get something out to review by early next week.

dhruv-raithatha avatar Apr 30 '25 18:04 dhruv-raithatha