SOLR-18202 Reduce Memory Usage of testSequentialVsParallelFingerprint#4310
Open
kotman12 wants to merge 1 commit intoapache:mainfrom
Open
SOLR-18202 Reduce Memory Usage of testSequentialVsParallelFingerprint#4310kotman12 wants to merge 1 commit intoapache:mainfrom
kotman12 wants to merge 1 commit intoapache:mainfrom
Conversation
mlbiscoc
reviewed
Apr 21, 2026
Comment on lines
+51
to
+52
| IndexWriter writer = iwRef.get(); | ||
| for (int i = 0; i < numDocs; i++) { |
Contributor
There was a problem hiding this comment.
Suggested change
| IndexWriter writer = iwRef.get(); | |
| for (int i = 0; i < numDocs; i++) { | |
| IndexWriter writer = iwRef.get(); | |
| writer.getConfig().setMergePolicy(NoMergePolicy.INSTANCE);; | |
| for (int i = 0; i < numDocs; i++) { |
Should we add this NoMergePolicy? I know we used solrconfig-nomergepolicyfactory.xml for config but does this bypass that? I trust you that this probably still creates the segments without it.
Contributor
Author
mlbiscoc
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

https://issues.apache.org/jira/browse/SOLR-18202
Description
testSequentialVsParallelFingerprint creates a bunch of segments by design. This creates enormous memory overhead, partly because a new searcher is opened with each commit.
Solution
I tried setting openSearcher to false but the RealtimeGetHandler searcher still gets opened and incurs similar memory overhead per commit. I landed on just writing via IW which seems ok for this test? For reference by doing this we reduce the total memory consumption of this test by about 10-20X according to my profiler.