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

EphemeralForBtreeImplTestHarnessHelper builds SortedDataInterface with empty index key specification

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.1.6
    • Component/s: None
    • Storage Execution

      The EphemeralForBtreeImplTestHarnessHelper class builds a SortedDataInterface with an empty index key specification. This leads the BuilderAddSameKey test in the storage_ephemeral_for_test_btree_test suite, which generates a DuplicateKey exception, to call buildDupKeyErrorStatus in index_entry_comparison.cpp with an empty key definition and a non-empty set of key values.

      This behavior prevents us from adding stronger invariants to buildDupKeyErrorStatus, such as the following: 

      invariant(keyPattern.nFields() == key.nFields()); 

      This would be a good addition as this method iterates over both key and values in a single loop, with the assumption that they contain the same number of elements.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: