diff options
author | Tommaso Tocci <tommaso.tocci@mongodb.com> | 2020-11-06 00:25:04 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-06 19:43:11 +0000 |
commit | 640a850162bfe814444b35a8b2143f78ae40e20d (patch) | |
tree | 9edc3d8ccf719d488870ee9a4e2724d63d577f51 /src/mongo/client/dbclient_cursor.cpp | |
parent | d6c15c62c4335266dfd30336ae1cf582b84e09ac (diff) | |
download | mongo-640a850162bfe814444b35a8b2143f78ae40e20d.tar.gz |
SERVER-52621 Remove stale version execption handling in OpQuery exec path
Diffstat (limited to 'src/mongo/client/dbclient_cursor.cpp')
-rw-r--r-- | src/mongo/client/dbclient_cursor.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mongo/client/dbclient_cursor.cpp b/src/mongo/client/dbclient_cursor.cpp index 8031febcffa..10e7ad1adf9 100644 --- a/src/mongo/client/dbclient_cursor.cpp +++ b/src/mongo/client/dbclient_cursor.cpp @@ -363,11 +363,11 @@ void DBClientCursor::dataReceived(const Message& reply, bool& retry, string& hos QueryResult::View qr = reply.singleData().view2ptr(); resultFlags = qr.getResultFlags(); - if (qr.getResultFlags() & ResultFlag_ErrSet) { + if (resultFlags & ResultFlag_ErrSet) { wasError = true; } - if (qr.getResultFlags() & ResultFlag_CursorNotFound) { + if (resultFlags & ResultFlag_CursorNotFound) { // cursor id no longer valid at the server. invariant(qr.getCursorId() == 0); @@ -408,11 +408,9 @@ void DBClientCursor::dataReceived(const Message& reply, bool& retry, string& hos _client->checkResponse(batch.objs, false, &retry, &host); // watches for "not primary" - if (qr.getResultFlags() & ResultFlag_ShardConfigStale) { - BSONObj error; - verify(peekError(&error)); - uasserted(StaleConfigInfo::parseFromCommandError(error), "stale config on lazy receive"); - } + tassert(5262101, + "Deprecated ShardConfigStale flag encountered in query result", + !(resultFlags & ResultFlag_ShardConfigStaleDeprecated)); /* this assert would fire the way we currently work: verify( nReturned || cursorId == 0 ); |