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

feat: support cuckoo filter and most commands #2545

Closed
wants to merge 14 commits into from

Conversation

jonathanc-n
Copy link
Contributor

references issue: #2534

Added support for all commands except for SCANDUMP and LOADCHUNK.

The go cases are currently being worked on.

@torwig
Copy link
Contributor

torwig commented Sep 19, 2024

Running ./x.py format should make the linter happy.

src/types/redis_cuckoo.cc Outdated Show resolved Hide resolved
src/types/redis_cuckoo.cc Show resolved Hide resolved
@torwig
Copy link
Contributor

torwig commented Sep 19, 2024

@jonathanc-n Thank you for this contribution. Great job!

@PragmaTwice
Copy link
Member

Thanks for your contribution!

However, I cannot find a proposal to state the design details and storage format of the new data structure.

May I ask you provide such a proposal before we continue to review this patch?

@jonathanc-n
Copy link
Contributor Author

@PragmaTwice it is mentioned in #2539, I added some extra information to clarify some things.


/*
This project uses Redis, which is licensed under your choice of the
Redis Source Available License 2.0 (RSALv2) or the Server Side Public License v1 (SSPLv1).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an ASF project, we CANNOT use any code under these non-open-source licenses, which includes RSAL and SSPL.

for (const auto &filter : filters) {
PutFixed16(dst, filter.bucket_size);
PutFixed64(dst, filter.num_buckets);
dst->append(filter.data.begin(), filter.data.end());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt the efficiency of this approach: everytime we read/update the filters, we need to retrieve/put all of these filters.

Please refer to the design of bloom filters to see if you can put filters to multiple key values.

@jonathanc-n
Copy link
Contributor Author

@PragmaTwice Sorry, about this implementation, are you able to close this pr. I might come back to it with a completely different code implementation.

@PragmaTwice
Copy link
Member

Sure.

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

Successfully merging this pull request may close these issues.

3 participants