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

CF ADD (error) Maximum expansions reached #599

Open
vansenic opened this issue Dec 24, 2022 · 2 comments
Open

CF ADD (error) Maximum expansions reached #599

vansenic opened this issue Dec 24, 2022 · 2 comments

Comments

@vansenic
Copy link

127.0.0.1:6379> CF.ADD zelnic_filter_detail d04f44de11aa8a084d7c0b37d434d59a
(error) Maximum expansions reached
127.0.0.1:6379> CF.INFO zelnic_filter_detail
 1) Size
 2) (integer) 33320
 3) Number of buckets
 4) (integer) 512
 5) Number of filters
 6) (integer) 32
 7) Number of items inserted
 8) (integer) 29337
 9) Number of items deleted
10) (integer) 1
11) Bucket size
12) (integer) 2
13) Expansion rate
14) (integer) 1
15) Max iterations
16) (integer) 20

How to fix this "Maximum expansions reached" error?

@gkorland
Copy link
Contributor

How did you create the filter?
Did you check https://redis.io/commands/cf.reserve/?

@ashtul
Copy link
Contributor

ashtul commented Jan 2, 2023

@vansenic the max expansion is in place since with every new filter, you add an error rate to your filter. At some point, it does not make sense to have the filter anymore.

It seems like your filter (or some of your filters) has a high rate of expansion. In this case, the recommendation is to use the EXPANSION expansion variable of 2 or even 4 with the CF.RESERVE command. Additional filters will be twice as large as the previous filter, which is a good fit in cases where filters are expected to grow by a significant amount (or when the final size is unknown when the filter is being created).

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

3 participants