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

Introduce TestLucene90DocValuesFormatVariableSkipInterval for testing docvalues skipper index #13550

Merged
merged 7 commits into from
Jul 9, 2024

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Jul 8, 2024

In #13449 we introduced a sparse index on top of doc values. One of the challenges was to properly test it as the default interval size is 4096 documents so we need a fair amount of documents to have a good number of intervals.

Therefore in this commit we propose to be able to configure dynamically the interval size for testing, and add a new test that changes the interval size randomly.

@iverase iverase requested a review from jpountz July 8, 2024 11:28
@iverase iverase changed the title Introduce a SkipperCodec for testing docvalues skipper index Introduce TestLucene90DocValuesFormatVariableSkipIntervalfor testing docvalues skipper index Jul 9, 2024
@iverase
Copy link
Contributor Author

iverase commented Jul 9, 2024

@jpountz I added a new test and change the title and description of the issue as we don't need to add a new Codec.

@@ -96,6 +97,7 @@ public Lucene90DocValuesConsumer(
state.segmentInfo.getId(),
state.segmentSuffix);
maxDoc = state.segmentInfo.maxDoc();
this.skipIndexIntervalSize = skipIndexIntervalSize;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we make any assumption anywhere that this needs to be a power of two? If so we should validate it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No , there is no assumption. On the other hand I added in the codec a check so skipIndexIntervalSize must be 1. In addtion I replace 1 << x by an integer to remove the suggestion that this is required.

@iverase iverase changed the title Introduce TestLucene90DocValuesFormatVariableSkipIntervalfor testing docvalues skipper index Introduce TestLucene90DocValuesFormatVariableSkipInterval for testing docvalues skipper index Jul 9, 2024
@iverase iverase merged commit 392ddc1 into apache:main Jul 9, 2024
3 checks passed
@iverase iverase deleted the skipperCodec branch July 9, 2024 13:46
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.

2 participants