Enable SourceLookup to leverage sequential stored fields reader#63035
Enable SourceLookup to leverage sequential stored fields reader#63035cbuescher merged 6 commits intoelastic:masterfrom
Conversation
|
Using elastic/rally-tracks#133 the current state shows improvements when using runtime fields in "docvalue_fields" but not inside queries.
|
c49cd2c to
9d31ccf
Compare
9d31ccf to
0362496
Compare
|
Plugging the optimization in SourceLookup#setSegmentAndDocument like in 6924c53 now also shows significant speed up when using runtime fields in a query: Baseline: master
|
|
I also tested terms aggregation on a runtime field over a time slice of the http_log docs (elastic/rally-tracks@ee9e11b), this PR also shows noticable speedups:
|
|
@elasticmachine run elasticsearch-ci/packaging-sample-windows |
|
Pinging @elastic/es-search (:Search/Search) |
jimczi
left a comment
There was a problem hiding this comment.
Glad to see that the pr improves queries and aggregations significantly. I left one comment regarding some changes that could be removed.
| LeafReaderContext context, | ||
| int docId, | ||
| SourceLookup sourceLookup, | ||
| CheckedBiConsumer<Integer, FieldsVisitor, IOException> fieldReader, |
There was a problem hiding this comment.
Can you remove this change now that SourceLookup leverages the sequential reader automatically ?
|
@jimczi thanks for the review, I removed the left-overs from previous iterations |
jimczi
left a comment
There was a problem hiding this comment.
LGTM.
It would be nice to know the effect of the change when using the runtime field in conjunction with a sparse indexed field but we can tackle this in the rally challenge that you're iterating on. So +1 to merge as is.
|
@jimczi thanks, my understanding is this should go to 7.10 as well? |
…tic#63035) In elastic#62509 we already plugged faster sequential access for stored fields in the fetch phase. This PR now adds using the potentially better field reader also in SourceLookup. Rally exeriments are showing that this speeds up e.g. when runtime fields that are using "_source" are added e.g. via "docvalue_fields" or are used in queries or aggs. Closes elastic#62621
…) (#63316) In #62509 we already plugged faster sequential access for stored fields in the fetch phase. This PR now adds using the potentially better field reader also in SourceLookup. Rally exeriments are showing that this speeds up e.g. when runtime fields that are using "_source" are added e.g. via "docvalue_fields" or are used in queries or aggs. Closes #62621
|
I went ahead mergin to 7.x with #63316, let me know if there are any concerns with this. |
This is a WIP draft of using similar optimizations as in #62509 for SourceLookup.
This PR is using the potentially better field reader from the fetch phase also in SourceLookup.
First rally exeriments show that this speeds up e.g. when runtime fields that are using "_source" are
added e.g. via "docvalue_fields" in the search hits. Using runtime fields that are using "_source" in
queries or aggs isn't affected so far.