Coverity is complaining about multiple places in our code where we do not check the return value of RecordStore.restore()
/** * Recovers from potential state changes in underlying data. * * Returns false if it is invalid to continue using this iterator. This usually means that * capped deletes have caught up to the position of this iterator and continuing could * result in missed data. * * If the former position no longer exists, but it is safe to continue iterating, the * following call to next() will return the next closest position in the direction of the * scan, if any. * * This handles restoring after either savePositioned() or saveUnpositioned(). */ virtual bool restore(OperationContext* txn) = 0;
It looks like all of the cases where we do this are safe and do not need to deal with the capped collections edge case. However, this is probably an indication that the API for RecordStore could be improved--it's a bit odd to have a return value that we throw away most of the time.