IndexCatalogImpl::_isSpecOk() doesn't properly check if the NamespaceString is the oplog collection

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • ALL
    • Execution Team 2019-06-17
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In IndexCatalogImpl::_isSpecOk(), we use NamespaceString::isOplog() to see if the collection we're verifying the index spec for is the oplog collection. See here.

      However, NamespaceString::isOplog() calls NamespaceString::oplog() which has the following check:

      static bool oplog(StringData ns) {
          return ns.startsWith("local.oplog.");
      }
      

      The problem is that in IndexCatalogImpl::_isSpecOk(), our NamespaceString doesn't have the trailing "." that NamespaceString::oplog() checks for. Our NamespaceString would be "local.oplog".

            Assignee:
            Zach Yam (Inactive)
            Reporter:
            Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: