Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-75010

Implement no-op planShardedSearch in 5.0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.22, 5.0.18
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Optimization
    • Minor Change
    • ALL
    • v5.0, v4.4
    • QO 2023-04-03, QO 2023-04-17, QO 2023-05-01

      Currently planShardedSearch is only implemented in 6.0+. Thus when a sharded cluster receives a $search query with sort, it does not support merge sorting on $searchSortValues as mongos never got a sortSpec from mongot, resulting in incorrect query results (potentially not sorted results).

      The task of this ticket is to send a planShardedSearch request in sharded cluster in 5.0 to mongot, indicating to mongot that mongos does not support sort. Mongot will respond with an error if the query contains a sort, causing mongos to error out. This will solve the problem described above by returning an error rather than silently returning incorrect results.

            ben.shteinfeld@mongodb.com Ben Shteinfeld
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            0 Vote for this issue
            3 Start watching this issue