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

Replace classic stage builder index invariants with tassert; Add tests for parsing 'NumberLongs' as arguments to bitwise expressions

    • Query Execution
    • Fully Compatible

      Currently Classic and SBE stage builders differ on the assertion severities when encountering missing index descriptors.

      Classic uses a invariant() which is process fatal:

                  auto descriptor = collectionPtr->getIndexCatalog()->findIndexByName(
                      _opCtx, ixn->index.identifier.catalogName);
                  invariant(descriptor,
                            str::stream() << "Namespace: " << collectionPtr->ns().toStringForErrorMsg()
                                          << ", CanonicalQuery: " << _cq.toStringShortForErrorMsg()
                                          << ", IndexEntry: " << ixn->index.toString()); 

      while SBE uses a tassert() which just kills the operation in non-test environments:

       

          auto desc = collection->getIndexCatalog()->findIndexByName(opCtx, indexName);
          tassert(5432209,
                  str::stream() << "index descriptor not found for index named '" << indexName
                                << "' in collection '" << collection->ns().toStringForErrorMsg() << "'",
                  desc); 

       

            Assignee:
            kyle.booker@mongodb.com Kyle Booker (Inactive)
            Reporter:
            catalin.sumanaru@mongodb.com Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: