- 
                Notifications
    You must be signed in to change notification settings 
- Fork 25.6k
          ccs_minimize_roundtrips should default to true for async search for CPS
          #135614
        
          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
          
     Merged
      
      
            pawankartik-elastic
  merged 11 commits into
  elastic:main
from
pawankartik-elastic:pkar/cps-mrt-default-true
  
      
      
   
  Oct 3, 2025 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            11 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      972f34e
              
                `ccs_minimize_roundtrips` should default to `true` for async search f…
              
              
                pawankartik-elastic a72a5d9
              
                Merge branch 'main' into pkar/cps-mrt-default-true
              
              
                pawankartik-elastic 10662e6
              
                Merge branch 'main' into pkar/cps-mrt-default-true
              
              
                pawankartik-elastic 80461af
              
                Set `MRT` when parsing instead of waiting for `TSA`
              
              
                pawankartik-elastic 2b3117d
              
                Merge branch 'main' into pkar/cps-mrt-default-true
              
              
                pawankartik-elastic 6ae750a
              
                Merge branch 'main' into pkar/cps-mrt-default-true
              
              
                pawankartik-elastic f35bf00
              
                Address some review comments
              
              
                pawankartik-elastic 264302e
              
                Add comments to endpoints clarifying CPS context argument
              
              
                pawankartik-elastic fcf4f09
              
                Propagate CPS context value
              
              
                pawankartik-elastic fbffdfe
              
                Add clarifying comments for CPS context argument
              
              
                pawankartik-elastic d2306a4
              
                Merge branch 'main' into pkar/cps-mrt-default-true
              
              
                pawankartik-elastic File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  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.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know that none of the subclasses of this class are cross-project enabled? We'll need to track those down and ensure that this Optional.empty() is valid for all. Otherwise, that arg will need to be added to the
parseInternalRequestmethod signature.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Irrespective of whether they're CPS-enabled or not,
Optional.empty()could be a valid argument since:Passing in
trueorfalsewould've marked their behaviour more explicitly. I'd prefer evaluating their CPS compatibility and updating this value in a separate PR. Wdyt?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I follow. If any CPS-enabled endpoints are using this
AbstractBulkByQueryRestHandlerclass as a parent, then they must not pass in Optional.empty() because setting ccs_minimize_roundtrips is not allowed in that case. I doubt any bulk endpoints are CCS enabled, but we need to track them down to make sure.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two endpoints using
AbstractBulkByQueryRestHandlerare_update_by_queryand_delete_by_query. They accept CCS patterns such asfoo*,remote*:bar*. However, the remotes included are not affected. For example,/*,*:*/_delete_by_querydoes not affect the remotes' docs. Instead, I see weird errors. If I specify a single remote, I no longer get any errors, but the docs still don't get deleted. I'm assuming this is an oversight, and that these endpoints don't play well with Cross Cluster ops in the first place. In that case,Optional.empty()is the right value here.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, we should prevent Cross Cluster ops for them like we're planning to do for Fleet searches.
Edit: I just found tickets that track this internally.