diff --git a/db/pdfile.cpp b/db/pdfile.cpp index 15705147d8c..b8818a32880 100644 --- a/db/pdfile.cpp +++ b/db/pdfile.cpp @@ -392,7 +392,7 @@ void IndexDetails::kill() { Keys will be left empty if key not found in the object. */ void IndexDetails::getKeysFromObject(JSObj& obj, set& keys) { - JSObj keyPattern = info.obj().getObjectField("key"); + JSObj keyPattern = info.obj().getObjectField("key"); // e.g., keyPattern == { ts : 1 } if( keyPattern.objsize() == 0 ) { cout << keyPattern.toString() << endl; cout << info.obj().toString() << endl; @@ -640,7 +640,6 @@ void _indexRecord(IndexDetails& idx, JSObj& obj, DiskLoc newRecordLoc) { for( set::iterator i=keys.begin(); i != keys.end(); i++ ) { assert( !newRecordLoc.isNull() ); try { -// DEBUGGING << "temp index: " << newRecordLoc.toString() << obj.toString() << endl; idx.head.btree()->insert(idx.head, newRecordLoc, (JSObj&) *i, false, idx, true); } diff --git a/dbgrid/request.cpp b/dbgrid/request.cpp index 55399825a38..97cea33dab6 100644 --- a/dbgrid/request.cpp +++ b/dbgrid/request.cpp @@ -20,27 +20,26 @@ #include "../grid/message.h" #include "../db/dbmessage.h" #include "connpool.h" - + void writeOp(int op, Message& m, MessagingPort& p) { - DbMessage d(m); + DbMessage d(m); + const char *ns = d.getns(); + + + + while( d.moreJSObjs() ) { + JSObj js = d.nextJsObj(); const char *ns = d.getns(); + assert(*ns); + // + // setClient(ns); + // ss << ns; + // theDataFileMgr.insert(ns, (void*) js.objdata(), js.objsize()); + // logOp("i", ns, js); + } +} - - - while( d.moreJSObjs() ) { - JSObj js = d.nextJsObj(); - const char *ns = d.getns(); - assert(*ns); -// -// setClient(ns); -// ss << ns; -// theDataFileMgr.insert(ns, (void*) js.objdata(), js.objsize()); -// logOp("i", ns, js); - } - -} - -void processRequest(Message& m, MessagingPort& p) { - int op = m.data->operation(); - writeOp(op, m, p); -} +void processRequest(Message& m, MessagingPort& p) { + int op = m.data->operation(); + writeOp(op, m, p); +}