[SERVER-38878] IndexCatalogImpl::_isSpecOk() doesn't properly check if the NamespaceString is the oplog collection Created: 07/Jan/19  Updated: 13/Jun/19  Resolved: 13/Jun/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Zach Yam (Inactive)
Resolution: Won't Do Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Execution Team 2019-06-17
Participants:

 Description   

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".



 Comments   
Comment by Louis Williams [ 13/Jun/19 ]

The oplog namespace is "local.oplog.rs", so this isn't actually an issue.

Generated at Thu Feb 08 04:50:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.