Esempio n. 1
0
 virtual void writeOp( int op , Request& r ){
     const char *ns = r.getns();
     
     if ( r.isShardingEnabled() && 
          strstr( ns , ".system.indexes" ) == strstr( ns , "." ) && 
          strstr( ns , "." ) ){
         log(1) << " .system.indexes write for: " << ns << endl;
         handleIndexWrite( op , r );
         return;
     }
     
     log(3) << "single write: " << ns << endl;
     doWrite( op , r , r.singleServerName() );
 }
Esempio n. 2
0
    virtual void writeOp( int op , Request& r ) {
        const char *ns = r.getns();

        if ( r.isShardingEnabled() &&
                strstr( ns , ".system.indexes" ) == strchr( ns , '.' ) &&
                strchr( ns , '.' ) ) {
            log(1) << " .system.indexes write for: " << ns << endl;
            handleIndexWrite( op , r );
            return;
        }

        log(3) << "single write: " << ns << endl;
        doWrite( op , r , r.primaryShard() );
        r.gotInsert(); // Won't handle mulit-insert correctly. Not worth parsing the request.
    }