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

Use range bounded cursors in place of prefix search_near on unique indexes

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2022-08-08, Execution Team 2022-08-22, Execution Team 2022-10-03, Storage Engines - 2022-10-31

      Unique index duplicate key check searches for the key's existence before insertion into the index. search_near cursor API is used for the purpose. With durable history, the search through a table with a lot of deleted content became more expensive hence causing regression with insertion into the unique indexes. A prefix-search API was added that would cause search_near to early exit if the search was past the prefix. The prefix-search is being replaced by a feature to configure bounds on a cursor.

      An existing prefix search can be replaced with a cursor bound on the prefix. This ticket will do so for the above-mentioned unique index usage in the server.

        1. lower-bound-inefficient.png
          lower-bound-inefficient.png
          85 kB
        2. master-search-next.png
          master-search-next.png
          98 kB

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            deepti.hasija@mongodb.com Deepti Hasija (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: