void ParallelSortClusteredCursor::_markStaleNS(const NamespaceString& staleNS, const StaleConfigException& e, bool& forceReload, bool& fullReload) { fullReload = e.requiresFullReload(); if (_staleNSMap.find(staleNS.ns()) == _staleNSMap.end()) _staleNSMap[staleNS.ns()] = 1; int tries = ++_staleNSMap[staleNS.ns()]; if (tries >= 5) { throw SendStaleConfigException(staleNS.ns(), str::stream() << "too many retries of stale version info", e.getVersionReceived(), e.getVersionWanted()); } forceReload = tries > 2; }
void ParallelSortClusteredCursor::_markStaleNS(OperationContext* txn, const NamespaceString& staleNS, const StaleConfigException& e, bool& forceReload) { if (e.requiresFullReload()) { Grid::get(txn)->catalogCache()->invalidate(staleNS.db()); } if (_staleNSMap.find(staleNS.ns()) == _staleNSMap.end()) _staleNSMap[staleNS.ns()] = 1; int tries = ++_staleNSMap[staleNS.ns()]; if (tries >= 5) { throw SendStaleConfigException(staleNS.ns(), str::stream() << "too many retries of stale version info", e.getVersionReceived(), e.getVersionWanted()); } forceReload = tries > 2; }