diff options
author | Irina Yatsenko <irina.yatsenko@mongodb.com> | 2022-05-04 17:59:05 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-04 18:29:35 +0000 |
commit | e8309b83c6d47d11ca746d371af229bb02520863 (patch) | |
tree | f1157ac3249650d396d002591a34b5c0c79b549f /src/mongo/db | |
parent | 6eea4e82817dc95d2d327c863f3d047b88ed4021 (diff) | |
download | mongo-e8309b83c6d47d11ca746d371af229bb02520863.tar.gz |
SERVER-58337 Log and count as deprecated commands issued via OP_QUERY
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/service_entry_point_common.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp index cbfb91d81fb..838a8c1e793 100644 --- a/src/mongo/db/service_entry_point_common.cpp +++ b/src/mongo/db/service_entry_point_common.cpp @@ -1506,8 +1506,12 @@ void ExecCommandDatabase::_initiateCommand() { } if (command->shouldAffectCommandCounter()) { - OpCounters* opCounters = &globalOpCounters; - opCounters->gotCommand(); + globalOpCounters.gotCommand(); + } + + if (!isHello() && _execContext->getMessage().operation() == dbQuery) { + warnDeprecation(*client, networkOpToString(dbQuery)); + globalOpCounters.gotQueryDeprecated(); } // Parse the 'maxTimeMS' command option, and use it to set a deadline for the operation on the |