diff options
author | Jason Rassi <rassi@10gen.com> | 2014-10-14 18:23:47 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-10-15 17:54:15 -0400 |
commit | 4b88d369d2489d1c6fac593ffeb1733d7bfc9c7b (patch) | |
tree | 8db71bc4e831b1f591478a3b9ef10de63b7ac813 /src/mongo/db/curop.cpp | |
parent | 53698194b24a5c889fa9215dae4fa6cd372e9e44 (diff) | |
download | mongo-4b88d369d2489d1c6fac593ffeb1733d7bfc9c7b.tar.gz |
SERVER-13584 CurOp "ns" reporting should fall back to using OpDebug
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 55ab25d6570..1ee7ee5c10b 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -170,7 +170,9 @@ namespace mongo { builder->append( "op" , opToString( _op ) ); - builder->append("ns", _ns.toString()); + // Fill out "ns" from our namespace member (and if it's not available, fall back to the + // OpDebug namespace member). + builder->append("ns", !_ns.empty() ? _ns.toString() : _debug.ns.toString()); if (_op == dbInsert) { _query.append(*builder, "insert"); @@ -214,7 +216,11 @@ namespace mongo { bool a = _active && _start; bob.append("active", a); bob.append( "op" , opToString( _op ) ); - bob.append("ns", _ns.toString()); + + // Fill out "ns" from our namespace member (and if it's not available, fall back to the + // OpDebug namespace member). + bob.append("ns", !_ns.empty() ? _ns.toString() : _debug.ns.toString()); + if (_op == dbInsert) { _query.append(bob, "insert"); } |