summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <erh@ERH-OFC-MP.local>2008-03-27 10:20:08 -0400
committerEliot Horowitz <erh@ERH-OFC-MP.local>2008-03-27 10:20:08 -0400
commit56df95be7831ad7e74cb7e84df0d2eed59a65993 (patch)
tree882923923e3c98c1de3f17d7a7ba19f3da39a9c5
parentadd70a7068f0c70e1d022e5ab7d90085f394a1f3 (diff)
downloadmongo-56df95be7831ad7e74cb7e84df0d2eed59a65993.tar.gz
Revert "making it readable in emacs"
This reverts commit add70a7068f0c70e1d022e5ab7d90085f394a1f3.
-rw-r--r--db/db.cpp162
1 files changed, 81 insertions, 81 deletions
diff --git a/db/db.cpp b/db/db.cpp
index 96ec0cbb9d8..03ba5e0adf5 100644
--- a/db/db.cpp
+++ b/db/db.cpp
@@ -300,87 +300,87 @@ public:
*/
void jniCallback(Message& m, Message& out)
{
- Client *clientOld = client;
-
- JniMessagingPort jmp(out);
- callDepth++;
- int curOpOld = curOp;
-
- try {
-
- stringstream ss;
- char buf[64];
- time_t_to_String(time(0), buf);
- buf[20] = 0; // don't want the year
- ss << buf << " dbjs ";
-
- {
- Timer t;
-
- bool log = false;
- curOp = m.data->operation;
- if( m.data->operation == dbQuery ) {
- receivedQuery(jmp, m, ss);
- }
- else if( m.data->operation == dbInsert ) {
- ss << "insert ";
- receivedInsert(m, ss);
- }
- else if( m.data->operation == dbUpdate ) {
- ss << "update ";
- receivedUpdate(m, ss);
- }
- else if( m.data->operation == dbDelete ) {
- ss << "remove ";
- receivedDelete(m);
- }
- else if( m.data->operation == dbGetMore ) {
- log = true;
- ss << "getmore ";
- receivedGetMore(jmp, m, ss);
- }
- else if( m.data->operation == dbKillCursors ) {
- try {
- log = true;
- ss << "killcursors ";
- receivedKillCursors(m);
- }
- catch( AssertionException ) {
- cout << "Caught Assertion in kill cursors, continuing" << endl;
- ss << " exception ";
- }
- }
- else {
- cout << " jnicall: operation isn't supported: " << m.data->operation << endl;
- assert(false);
- }
-
- int ms = t.millis();
- log = log || ctr++ % 128 == 0;
- if( log || ms > 100 ) {
- ss << ' ' << t.millis() << "ms";
- cout << ss.str().c_str() << endl;
- }
- if( client && client->profile >= 1 ) {
- if( client->profile >= 2 || ms >= 100 ) {
- // profile it
- profile(ss.str().c_str()+20/*skip ts*/, ms);
- }
- }
- }
-
- }
- catch( AssertionException ) {
- cout << "Caught AssertionException in jniCall()" << endl;
- }
-
- curOp = curOpOld;
- callDepth--;
-
- if( client != clientOld ) {
- client = clientOld;
- wassert(false);
- }
+ Client *clientOld = client;
+
+ JniMessagingPort jmp(out);
+ callDepth++;
+ int curOpOld = curOp;
+
+ try {
+
+ stringstream ss;
+ char buf[64];
+ time_t_to_String(time(0), buf);
+ buf[20] = 0; // don't want the year
+ ss << buf << " dbjs ";
+
+ {
+ Timer t;
+
+ bool log = false;
+ curOp = m.data->operation;
+ if( m.data->operation == dbQuery ) {
+ receivedQuery(jmp, m, ss);
+ }
+ else if( m.data->operation == dbInsert ) {
+ ss << "insert ";
+ receivedInsert(m, ss);
+ }
+ else if( m.data->operation == dbUpdate ) {
+ ss << "update ";
+ receivedUpdate(m, ss);
+ }
+ else if( m.data->operation == dbDelete ) {
+ ss << "remove ";
+ receivedDelete(m);
+ }
+ else if( m.data->operation == dbGetMore ) {
+ log = true;
+ ss << "getmore ";
+ receivedGetMore(jmp, m, ss);
+ }
+ else if( m.data->operation == dbKillCursors ) {
+ try {
+ log = true;
+ ss << "killcursors ";
+ receivedKillCursors(m);
+ }
+ catch( AssertionException ) {
+ cout << "Caught Assertion in kill cursors, continuing" << endl;
+ ss << " exception ";
+ }
+ }
+ else {
+ cout << " jnicall: operation isn't supported: " << m.data->operation << endl;
+ assert(false);
+ }
+
+ int ms = t.millis();
+ log = log || ctr++ % 128 == 0;
+ if( log || ms > 100 ) {
+ ss << ' ' << t.millis() << "ms";
+ cout << ss.str().c_str() << endl;
+ }
+ if( client && client->profile >= 1 ) {
+ if( client->profile >= 2 || ms >= 100 ) {
+ // profile it
+ profile(ss.str().c_str()+20/*skip ts*/, ms);
+ }
+ }
+ }
+
+ }
+ catch( AssertionException ) {
+ cout << "Caught AssertionException in jniCall()" << endl;
+ }
+
+ curOp = curOpOld;
+ callDepth--;
+
+ if( client != clientOld ) {
+ client = clientOld;
+ wassert(false);
+ }
}
void connThread()