dice icon indicating copy to clipboard operation
dice copied to clipboard

Inconsistent `BF`: Bloom Filter commands are inconsistent with Redis output

Open apoorvyadav1111 opened this issue 4 months ago • 2 comments

Found while working on #1031

Steps to reproduce

127.0.0.1:7379> bf.add k 1
(integer) 0
127.0.0.1:7379> bf.info k
name: k, error rate: 0.010000, capacity: 1024, total bits reserved: 10344, bits per element: 9.585058, hash functions: 7

Expected output

The expected output when the above set of commands (maybe when run on Redis)

127.0.0.1:6379> bf.info k
 1) Capacity
 2) (integer) 100
 3) Size
 4) (integer) 240
 5) Number of filters
 6) (integer) 1
 7) Number of items inserted
 8) (integer) 1
 9) Expansion rate
10) (integer) 2

Observed output

The observed output when the above set of commands when run on DiceDB

127.0.0.1:7379> bf.info k
name: k, error rate: 0.010000, capacity: 1024, total bits reserved: 10344, bits per element: 9.585058, hash functions: 7

Expectations for resolution

This issue will be considered resolved when the following things are done

  1. changes in the dice code to meet the expected behavior
  2. addition of relevant test case to ensure we catch the regression

You can find the tests under the integration_tests directory of the dice repository and the steps to run are in the README file. Refer to the following links to set up DiceDB and Redis 7.2.5 locally

apoorvyadav1111 avatar Oct 16 '24 08:10 apoorvyadav1111