-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
v4.4
-
Repl 2020-04-06
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I might not have chased this bug fully[1] but what I've observed is the following:
When checking dbhashes across replica set nodes, a collection that's on the primary, but missing on a secondary will proceed to compare collStats for the missing collection. A collstats for a missing collection:
test> db.server848.stats()
{
"ns" : "test.server848",
"size" : 0,
"count" : 0,
"storageSize" : 0,
"totalSize" : 0,
"nindexes" : 0,
"totalIndexSize" : 0,
"indexSizes" : {
},
"scaleFactor" : 1,
"ok" : 1
}
First observation of note is that calling collStats on a missing collection returns ok: 1 avoiding the early return.
Second, the indexBuilds field is (javascript) undefined.
If the primary's indexBuilds is undefined (leftArr), the code is robust.
If the secondary's indexBuilds is undefined (rightArr), a type error is hit.
[1] It's not obvious to me whether something changed in how collStats responds, or if this was always a failure waiting to happen.
- related to
-
SERVER-39452 Add rollback via refetch logic for startIndexBuild, abortIndexBuild, commitIndexBuild
-
- Closed
-