Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
-
ALL
Description
Currently, scan_checked_replset.js parses namespaces from documents by splitting the namespace on a period ".".
let [dbName, collName] = doc.namespace.split('.', 2);
|
This is problematic for collections that contain periods in the collection name, e.g:
admin.system.users
|
config.system.sessions
|
This leads to the script attempting to scan on partial namespaces:
{
|
"msg" : "Scanning range",
|
"range" : {
|
"_id" : {
|
"db" : "admin",
|
"collection" : "system",
|
"minKey" : { "$minKey" : 1 },
|
"maxKey" : { "$maxKey" : 1 }
|
}
|
}
|
}
|
{
|
"msg" : "Scanning range",
|
"range" : {
|
"_id" : {
|
"db" : "config",
|
"collection" : "system",
|
"minKey" : { "$minKey" : 1 },
|
"maxKey" : { "$maxKey" : 1 }
|
}
|
}
|
}
|
We can fix this by ensuring that the full collection name is not split against by slicing on the first occurrence of a "."
let i = doc.namespace.indexOf(".")
|
let [dbName, collName] = [doc.namespace.slice(0,i), doc.namespace.slice(i+1)];
|
Attachments
Issue Links
- is duplicated by
-
SERVER-65403 Update dbCheck-related scripts
-
- Closed
-