Skip to content

Commit

Permalink
SERVER-21677 Remove "diaglog" support from the server
Browse files Browse the repository at this point in the history
  • Loading branch information
monkey101 committed Sep 20, 2017
1 parent 9d07caa commit f7d154f
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 596 deletions.
86 changes: 0 additions & 86 deletions debian/mongod.1
Original file line number Diff line number Diff line change
Expand Up @@ -232,92 +232,6 @@ _
.UNINDENT
.INDENT 0.0
.TP
.B \-\-diaglog <value>
\fIDefault\fP: 0
.sp
Deprecated since version 2.6.

.sp
\fI\%\-\-diaglog\fP is for internal use and not intended for most users.
.sp
Creates a very verbose \fIdiagnostic log\fP for troubleshooting and
recording various errors. MongoDB writes these log files in the
\fBdbPath\fP directory in a series of files that begin with the
string \fBdiaglog\fP and end with the initiation time of the logging as a
hex string.
.sp
The specified value configures the level of verbosity:
.TS
center;
|l|l|.
_
T{
Value
T} T{
Setting
T}
_
T{
0
T} T{
Off. No logging.
T}
_
T{
1
T} T{
Log write operations.
T}
_
T{
2
T} T{
Log read operations.
T}
_
T{
3
T} T{
Log both read and write operations.
T}
_
T{
7
T} T{
Log write and some read operations.
T}
_
.TE
.sp
You can use the \fBmongosniff\fP tool to replay this output for
investigation. Given a typical diaglog file located at
\fB/data/db/diaglog.4f76a58c\fP, you might use a command in the following
form to read these files:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
mongosniff \-\-source DIAGLOG /data/db/diaglog.4f76a58c
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBWARNING:\fP
.INDENT 7.0
.INDENT 3.5
Setting the diagnostic level to \fB0\fP will cause \fBmongod\fP
to stop writing data to the \fIdiagnostic log\fP file. However,
the \fBmongod\fP instance will continue to keep the file open,
even if it is no longer writing data to the file. If you want to
rename, move, or delete the diagnostic log you must cleanly shut
down the \fBmongod\fP instance before doing so.
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-\-traceExceptions
For internal diagnostic use only.
.UNINDENT
Expand Down
200 changes: 0 additions & 200 deletions debian/mongosniff.1

This file was deleted.

14 changes: 0 additions & 14 deletions jstests/auth/lib/commands_lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -2245,20 +2245,6 @@ var authCommandsLib = {
}
]
},
{
testname: "diagLogging",
command: {diagLogging: 1},
skipSharded: true,
testcases: [
{
runOnDb: adminDbName,
roles: roles_hostManager,
privileges: [{resource: {cluster: true}, actions: ["diagLogging"]}]
},
{runOnDb: firstDbName, roles: {}},
{runOnDb: secondDbName, roles: {}}
]
},
{
testname: "distinct",
command: {distinct: "coll", key: "a", query: {}},
Expand Down
1 change: 0 additions & 1 deletion jstests/core/views/views_all_commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@
},
dbStats: {skip: "TODO(SERVER-25948)"},
delete: {command: {delete: "view", deletes: [{q: {x: 1}, limit: 1}]}, expectFailure: true},
diagLogging: {skip: isUnrelated},
distinct: {command: {distinct: "view", key: "_id"}},
driverOIDTest: {skip: isUnrelated},
drop: {command: {drop: "view"}},
Expand Down
1 change: 0 additions & 1 deletion jstests/sharding/safe_secondary_reads_drop_recreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
dbHash: {skip: "does not return user data"},
dbStats: {skip: "does not return user data"},
delete: {skip: "primary only"},
diagLogging: {skip: "does not return user data"},
distinct: {
setUp: function(mongosConn) {
assert.writeOK(mongosConn.getCollection(nss).insert({x: 1}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
dbHash: {skip: "does not return user data"},
dbStats: {skip: "does not return user data"},
delete: {skip: "primary only"},
diagLogging: {skip: "does not return user data"},
distinct: {
setUp: function(mongosConn) {
assert.writeOK(mongosConn.getCollection(nss).insert({x: 1}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
dbHash: {skip: "does not return user data"},
dbStats: {skip: "does not return user data"},
delete: {skip: "primary only"},
diagLogging: {skip: "does not return user data"},
distinct: {
setUp: function(mongosConn) {
assert.writeOK(mongosConn.getCollection(nss).insert({x: 1}));
Expand Down
13 changes: 0 additions & 13 deletions src/mongo/db/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ env.Library(
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/storage/mmap_v1/mmap_v1_options',
'diag_log',
'repl/repl_settings',
'server_options',
'storage/storage_options',
Expand Down Expand Up @@ -592,7 +591,6 @@ env.Library(
'concurrency/lock_manager',
'curop',
'curop_metrics',
'diag_log',
'lasterror',
'ops/write_ops_parsers',
'rw_concern_d',
Expand Down Expand Up @@ -756,16 +754,6 @@ env.Library(
],
)

env.Library(
target="diag_log",
source=[
"diag_log.cpp",
],
LIBDEPS=[
"storage/storage_options",
],
)

env.Library(
target="authz_manager_external_state_factory_d",
source=[
Expand Down Expand Up @@ -818,7 +806,6 @@ env.Library(
"db_raii",
"dbdirectclient",
"dbhelpers",
"diag_log",
"exec/exec",
"exec/working_set",
"ftdc/ftdc_mongod",
Expand Down
1 change: 0 additions & 1 deletion src/mongo/db/auth/action_types.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"createUser",
"dbHash",
"dbStats",
"diagLogging",
"dropAllRolesFromDatabase", # Not used for permissions checks, but to id the event in logs.
"dropAllUsersFromDatabase", # Not used for permissions checks, but to id the event in logs.
"dropCollection",
Expand Down
Loading

0 comments on commit f7d154f

Please sign in to comment.