diff options
author | Jason Rassi <rassi@10gen.com> | 2014-10-03 19:36:28 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-11-25 17:49:07 -0500 |
commit | cf8bb50e5a8a22205e344e0536646f1ca6bc81e4 (patch) | |
tree | 540b71000862c09ed608f7c2074c635f9c8cd4bc /src/mongo/db/introspect.cpp | |
parent | 8f0d423946be1873d0af5c6db488d2bee9629899 (diff) | |
download | mongo-cf8bb50e5a8a22205e344e0536646f1ca6bc81e4.tar.gz |
SERVER-6218 Profiler should only abbreviate query/updateobj
Diffstat (limited to 'src/mongo/db/introspect.cpp')
-rw-r--r-- | src/mongo/db/introspect.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/mongo/db/introspect.cpp b/src/mongo/db/introspect.cpp index 9218ad25774..6dd6c323a99 100644 --- a/src/mongo/db/introspect.cpp +++ b/src/mongo/db/introspect.cpp @@ -45,10 +45,6 @@ #include "mongo/util/goodies.h" #include "mongo/util/log.h" -namespace { - const size_t MAX_PROFILE_DOC_SIZE_BYTES = 100*1024; -} - namespace mongo { namespace { @@ -94,8 +90,7 @@ namespace { // build object BSONObjBuilder b(profileBufBuilder); - const bool isQueryObjTooBig = !currentOp.debug().append(currentOp, b, - MAX_PROFILE_DOC_SIZE_BYTES); + currentOp.debug().append(currentOp, b); b.appendDate("ts", jsTime()); b.append("client", c.clientAddress()); @@ -105,27 +100,6 @@ namespace { BSONObj p = b.done(); - if (static_cast<size_t>(p.objsize()) > MAX_PROFILE_DOC_SIZE_BYTES || isQueryObjTooBig) { - string small = p.toString(/*isArray*/false, /*full*/false); - - warning() << "can't add full line to system.profile: " << small << endl; - - // rebuild with limited info - BSONObjBuilder b(profileBufBuilder); - b.appendDate("ts", jsTime()); - b.append("client", c.clientAddress() ); - _appendUserInfo(currentOp, b, authSession); - - b.append("err", "profile line too large (max is 100KB)"); - - // should be much smaller but if not don't break anything - if (small.size() < MAX_PROFILE_DOC_SIZE_BYTES){ - b.append("abbreviated", small); - } - - p = b.done(); - } - WriteUnitOfWork wunit(txn); // write: not replicated |