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

Eliminate redundant duplicate key checking in SortedDataBuilderInterface

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • Execution Team 2024-12-09, Execution Team 2024-12-23

      Both WiredTigerIndex::BulkBuilder and SortedDataIndexAccessMethod::BulkBuilderImpl are checking for duplicate keys when building indexes. In addition to being redundant dead code, the handling in SDIAMBBI for when WTIBB reports a duplicate is incorrect. Before SERVER-95960 it would be an invariant failure, and after that it bypasses onDuplicateRecord and just reports the error.

      Removing the duplicated check will have a small runtime perf benefit and solves a problem where SERVER-89359 would need to start copying the buffer to be able to perform the check.

            Assignee:
            thomas.goyne@mongodb.com Thomas Goyne
            Reporter:
            thomas.goyne@mongodb.com Thomas Goyne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: