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

Upgrade to new Lucene snapshot #87932

Merged
merged 4 commits into from
Jun 23, 2022
Merged

Upgrade to new Lucene snapshot #87932

merged 4 commits into from
Jun 23, 2022

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Jun 22, 2022

This PR uses Lucene-9.3 snapshot in Elasticsearch 8.4. Noticeable changes in this Lucene snapshot:

  • Merge-on-refresh
  • No more pathological merging
  • SortedSetDocValues#count for value_count aggs

I have to disable merges on refresh in this upgrade because some tests rely on the stable storage after refresh/flush. Should we introduce an index setting for merges-on-fresh so users can disable or adjust the wait-for-merges on refresh/flush interval? Other option is to add a test-only setting so we can disable or use random value in tests. @jpountz WDYT?

@dnhatn dnhatn marked this pull request as ready for review June 23, 2022 15:31
@dnhatn dnhatn requested a review from jpountz June 23, 2022 15:32
@@ -2408,6 +2408,8 @@ private IndexWriterConfig getIndexWriterConfig() {
mergePolicy = new ShuffleForcedMergePolicy(mergePolicy);
}
iwc.setMergePolicy(mergePolicy);
// TODO: Introduce an index setting for setMaxFullFlushMergeWaitMillis
iwc.setMaxFullFlushMergeWaitMillis(-1);
Copy link
Member Author

Choose a reason for hiding this comment

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

We disable merges on refresh here.

@dnhatn dnhatn added the :Search/Search Search-related issues that do not fall into other categories label Jun 23, 2022
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jun 23, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@jpountz
Copy link
Contributor

jpountz commented Jun 23, 2022

I have to disable merges on refresh in this upgrade because some tests rely on the stable storage after refresh/flush. Should we introduce an index setting for merges-on-fresh so users can disable or adjust the wait-for-merges on refresh/flush interval? Other option is to add a test-only setting so we can disable or use random value in tests. @jpountz WDYT?

@ywelsch brought up the point that merge-on-refresh might also interfere in undesirable ways with internal refreshes. Let's disable merge-on-refresh always for now, and discuss how to enable it (including a setting if necessary) in a separate PR?

@dnhatn
Copy link
Member Author

dnhatn commented Jun 23, 2022

Let's disable merge-on-refresh always for now, and discuss how to enable it (including a setting if necessary) in a separate PR?

Yes, it's already disabled in this PR.

@dnhatn
Copy link
Member Author

dnhatn commented Jun 23, 2022

Thanks Adrien.

@dnhatn dnhatn merged commit c2dc6e6 into elastic:master Jun 23, 2022
@dnhatn dnhatn deleted the lucene-snapshot branch June 23, 2022 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team >upgrade v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants