Skip to content

Remove Lucene's PackedInt dependency from Cuckoo filter #74946

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

Merged
merged 3 commits into from
Jul 6, 2021

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Jul 6, 2021

Currently, Cuckoo filters use Lucene structures to hold in memory arrays of packed ints. This is problematic when we move to Lucene 9.0 as those classes have been heavily modified, In addition we use Lucene Input/output API to serialise / deserialise the data structure which will break as well as Lucene is changing the API endianness.

Therefore, this PR forks the Lucene data structure into a class called PackedArray. The main change is that this class will be using Elasticsearch streams to serialise / deserialise, therefore we remove the dependency in Lucene's endianness. WE are still using lucene PackedInts to handle backwards compatibility.

We added a ESRestTestCase that can trigger the creation of Cuckoo filters and run in a mixed cluster in order to check backwards compatibility.

backport #74736

iverase and others added 2 commits July 6, 2021 06:19
Forks the Lucene data structure into a class called PackedArray that can be serialised using
Elasticsearch streams.
@iverase iverase merged commit 818bad8 into elastic:7.x Jul 6, 2021
@iverase iverase deleted the backport74736 branch July 6, 2021 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant