-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Fix TimeSeriesRateAggregatorTests file leak #115278
Conversation
Pinging @elastic/es-analytical-engine (Team:Analytics) |
@kkrik-es you seem to be familiar with the Lucene changes in this area, is my reasoning above correct? |
@kkrik-es I saw you fixed the Leak issue with the change in #115345, however I believe that we are now throwing a different IAE than before the merge of Lucene 10 (in a different location), so I think this change here still applies. When the parent field is set we don't need to add documents separately and get back the "old" IAE from before the Lucene 10 update. Would you mind taking a look and let me know if my thinking here is right? |
/cc @iverase |
I am really not familiar with these changes, just noticed that @iverase applied them elsewhere.. If Ignacio is fine with it and the following test passes, I've no objection:
|
That passes. I asked you because this change in InternalEngine that also sets the parent field was made by you. I think the change in the IAE that is being thrown went unnoticed because we don't check it message so far (which I added here) |
I see, so we were missing setting the parent doc so there was a mismatch in Lucene land that led to errors? At any rate, I've no objection here. |
@elasticmachine elasticsearch-ci/part-2 |
With Lucene 10, IndexWriter requires a parent document field in order to use index sorting with document blocks. This lead to different IAE and file leaks in this test which are fixed by adapting the corresponding location in the test setup.
With Lucene 10, IndexWriter requires a parent document field in order to use index sorting with document blocks. In production code, we already use "setParentField" when creating an index writer configuration in InternalEngine, but some aggregation tests with nested docs still seem to use index writers without the parent field set. The IAE exception we get here now that Lucene 10 is merged hides another IAE that was tested for in
TimeSeriesRateAggregatorTests#testNestedWithinAutoDateHistogram
and on top of that occasionally leads to test failures due to file leaks as observed in #115238.Closes #115238