Details
-
Bug
-
Resolution: Done
-
Major - P3
-
3.1.4
-
Fully Compatible
-
ALL
-
RPL 5 06/26/16
Description
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?)
Attachments
Issue Links
- depends on
-
SERVER-18039 Add Initial Sync Skeleton to DataReplicator
-
- Closed
-