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

Duplicate uassert & fassert codes

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.5, 3.1.5
    • Affects Version/s: 3.0.3, 3.1.4
    • Component/s: Diagnostics
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Platform 5 06/26/16

      Code in Question:
      src\mongo\db\commands\list_indexes.cpp:

      #line 97

                  uassert(
                      28528,
                      str::stream() << "Argument to listIndexes must be of type String, not "
                                    << typeName(first.type()),
                      first.type() == String);
                  const NamespaceString ns(parseNs(dbname, cmdObj));
                  uassert(
                      28529,
                      str::stream() << "Argument to listIndexes must be a collection name, "
                                    << "not the empty string",
                      !ns.coll().empty());
      

      src\mongo\db\repl\replica_set_config.cpp:

      #line 508

              else if (status != ErrorCodes::NoSuchKey) {
                  // NoSuchKey means we have no $voter-tagged nodes in this config;
                  // other errors are unexpected.
                  fassert(28528, status);
              }
      
              // $stepDownCheck: one electable node plus ourselves
              pattern = _tagConfig.makePattern();
              status = _tagConfig.addTagCountConstraintToPattern(&pattern,
                                                                 MemberConfig::kInternalElectableTagName,
                                                                 2);
              if (status.isOK()) {
                  _customWriteConcernModes[kStepDownCheckWriteConcernModeName] = pattern;
              }
              else if (status != ErrorCodes::NoSuchKey) {
                  // NoSuchKey means we have no $electable-tagged nodes in this config;
                  // other errors are unexpected
                  fassert(28529, status);
              }
      

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: