-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 3.1.4
-
Component/s: Replication
-
Fully Compatible
-
ALL
-
RPL 5 06/26/16
-
None
-
None
-
None
-
None
-
None
-
None
-
None
DataReplicator::_onOplogFetchFinish has this code:
BSONElement tsElem(doc->getField("ts"));
while(tsElem.eoo() || doc != docs.rend()) {
tsElem = (doc++)->getField("ts");
}
if (!tsElem.eoo()) {
_lastTimestampFetched = tsElem.timestamp();
} else {
warning() <<
"Did not find a 'ts' timestamp field in any of the fetched documents";
}
1 - It seems like the while(tsElem.eoo()) condition would prevent the else/warning block from ever being executed because the code can't advance until tsElem.eoo() == false.
2 - The or condition in while() seems like it could allow doc to advance past docs.rend() when no docs have a 'ts' field. (Should it just be an && condition instead?)
- depends on
-
SERVER-18039 Add Initial Sync Skeleton to DataReplicator
-
- Closed
-