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

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.2.0-rc0
    • None
    • None
    • Fully Compatible
    • Execution Team 2022-08-08, Execution Team 2022-08-22, Execution Team 2022-10-03, Storage Engines - 2022-10-31

    Description

      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.

      Attachments

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

        Issue Links

          Activity

            People

              gregory.wlodarek@mongodb.com Gregory Wlodarek
              deepti.hasija@mongodb.com Deepti Hasija
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: