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

Duplicate key error E11000 doesn't show the key name on ephemeralForTest storage engine

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage
    • Labels:
    • Operating System:
      ALL
    • Sprint:
      Storage NYC 2018-09-24
    • Case:

      Description

      This is the error message in Wiredtiger:

      "errmsg" : "E11000 duplicate key error collection: test.some_col index: user_id_1 dup key: { : 1.0 }"

      and this in ephemeralForTest:

      "errmsg" : "E11000 duplicate key error dup key: { : 1.0 }"

      The source code shows that adding the _indexName to the error string is marked as TODO.

      // taken from btree_logic.cpp
      Status dupKeyError(const BSONObj& key) {
          StringBuilder sb;
          sb << "E11000 duplicate key error ";
          // sb << "index: " << _indexName << " "; // TODO
          sb << "dup key: " << key;
          return Status(ErrorCodes::DuplicateKey, sb.str());
      }

      Thanks

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: