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

[Backport 2.x] Fix DerivedFieldQuery to support concurrent search. #15454

Merged
merged 1 commit into from
Aug 28, 2024

Commits on Aug 27, 2024

  1. Fix DerivedFieldQuery to support concurrent search. (#15326)

    * Fix DerivedFieldQuery to support concurrent search.
    
    This change updates DerivedFieldQuery to create a separate ValueFetcher instance per thread.
    The DerivedFieldValueFetcher is not thread safe in that it holds a ref to a compiled DerivedFieldScript that is
    created per thread.  Each script also holds a SourceLookup object that is not thread safe.
    
    Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
    
    * Fix broken cases relying on ObjectDerivedFieldValueFetcher.
    
    DerivedFieldQuery will accept a supplier for a valueFetcher rather than constructing it.
    This ensures that the DerivedFieldType creating the query (obj or regular) passes the correct supplier func.
    
    Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
    
    * remove unused clone method
    
    Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
    
    * Add changelog entry
    
    Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
    
    * add an extra test for DerivedFieldType multiPhraseQuery
    
    Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
    
    * more coverage
    
    Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
    
    * add tests for normalizedWildcard and phrase prefix
    
    Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
    
    ---------
    
    Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
    (cherry picked from commit c771bdd)
    Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    144c309 View commit details
    Browse the repository at this point in the history