From d90e9a13a515a2c408b58ed0fad60a327ac7d3b7 Mon Sep 17 00:00:00 2001 From: Dan Pasette Date: Thu, 21 Sep 2017 11:58:18 -0400 Subject: Revert "Revert "SERVER-21677 Remove "diaglog" support from the server"" This reverts commit 0e3c8a96af7f9ddd6d5a059c92f6303eba1d0b32. Fixed up rpm scripts to exclude mongosniff --- src/mongo/db/service_entry_point_mongod.cpp | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/mongo/db/service_entry_point_mongod.cpp') diff --git a/src/mongo/db/service_entry_point_mongod.cpp b/src/mongo/db/service_entry_point_mongod.cpp index 1e24a469a1d..dfec6d0382b 100644 --- a/src/mongo/db/service_entry_point_mongod.cpp +++ b/src/mongo/db/service_entry_point_mongod.cpp @@ -44,7 +44,6 @@ #include "mongo/db/curop_metrics.h" #include "mongo/db/cursor_manager.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/diag_log.h" #include "mongo/db/initialize_operation_session_info.h" #include "mongo/db/introspect.h" #include "mongo/db/jsobj.h" @@ -107,18 +106,6 @@ const StringMap cmdWhitelist = {{"delete", 1}, {"refreshLogicalSessionCacheNow", 1}, {"update", 1}}; -inline void opread(const Message& m) { - if (_diaglog.getLevel() & 2) { - _diaglog.readop(m.singleData().view2ptr(), m.header().getLen()); - } -} - -inline void opwrite(const Message& m) { - if (_diaglog.getLevel() & 1) { - _diaglog.writeop(m.singleData().view2ptr(), m.header().getLen()); - } -} - void generateLegacyQueryErrorResponse(const AssertionException* exception, const QueryMessage& queryMessage, CurOp* curop, @@ -1081,17 +1068,9 @@ DbResponse ServiceEntryPointMongod::handleRequest(OperationContext* opCtx, const if (op == dbQuery) { if (nsString.isCommand()) { isCommand = true; - opwrite(m); - } else { - opread(m); } - } else if (op == dbGetMore) { - opread(m); } else if (op == dbCommand || op == dbMsg) { isCommand = true; - opwrite(m); - } else { - opwrite(m); } CurOp& currentOp = *CurOp::get(opCtx); -- cgit v1.2.1