mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
minor, request.cpp started
This commit is contained in:
parent
2f9c588ef6
commit
4f23bf199f
@ -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<JSObj>& 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<JSObj>::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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user