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

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

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

      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@mongodb.com Zach Yam (Inactive)
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: