-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Nullify sourceAsMap once a search hit is processed #119734
Conversation
Pinging @elastic/es-search (Team:Search) |
💚 Backport successful
|
he sourceAsMap can use a significant amount of memory, still it is only hold for caching. Therefore it might make sense to nullify it once a search hit is processed so we free that memory.
Would it be possible to have a test that verifies the new behavior introduced, or perhaps assertions that make sure that sourceMap is reset when needed? |
@javanna I sam reverting this change as I think you are right, this change needs some test and assertions. More over there are places where we are calling getSourceAsMap after generating the hits so we need to check if this is affecting those cases. |
The sourceAsMap can use a significant amount of memory, still it is only hold for caching. Therefore it might make sense to nullify it once a search hit is processed so we free that memory.