summaryrefslogtreecommitdiff
path: root/src/mongo/client/dbclient_cursor.cpp
diff options
context:
space:
mode:
authorTommaso Tocci <tommaso.tocci@mongodb.com>2020-11-06 00:25:04 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-06 19:43:11 +0000
commit640a850162bfe814444b35a8b2143f78ae40e20d (patch)
tree9edc3d8ccf719d488870ee9a4e2724d63d577f51 /src/mongo/client/dbclient_cursor.cpp
parentd6c15c62c4335266dfd30336ae1cf582b84e09ac (diff)
downloadmongo-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.cpp12
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 );