summaryrefslogtreecommitdiff
path: root/s/strategy_single.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-09-10 13:09:26 -0400
committerEliot Horowitz <eliot@10gen.com>2009-09-10 13:09:26 -0400
commit47a7238303990fbd9ebf8834d8abd2b7fc50fe72 (patch)
tree21e19c4a6b702f596d1c55246b720b05af3d7077 /s/strategy_single.cpp
parentf496a2e2d83bcc8634aaec3f2b298c396f4a9f06 (diff)
downloadmongo-47a7238303990fbd9ebf8834d8abd2b7fc50fe72.tar.gz
claener command output for sharding
Diffstat (limited to 's/strategy_single.cpp')
-rw-r--r--s/strategy_single.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/s/strategy_single.cpp b/s/strategy_single.cpp
index 2408b48055e..520265bf90f 100644
--- a/s/strategy_single.cpp
+++ b/s/strategy_single.cpp
@@ -8,7 +8,14 @@
namespace mongo {
class SingleStrategy : public Strategy {
+
+ public:
+ SingleStrategy(){
+ _commandsSafeToPass.insert( "$eval" );
+ _commandsSafeToPass.insert( "create" );
+ }
+ private:
virtual void queryOp( Request& r ){
QueryMessage q( r.d() );
@@ -27,7 +34,8 @@ namespace mongo {
}
string commandName = q.query.firstElement().fieldName();
- log() << "passing through command: " << commandName << " " << q.query << endl;
+ if ( ! _commandsSafeToPass.count( commandName ) )
+ log() << "passing through unknown command: " << commandName << " " << q.query << endl;
}
lateAssert = true;
@@ -112,6 +120,8 @@ namespace mongo {
log(3) << "single write: " << ns << endl;
doWrite( op , r , r.singleServerName() );
}
+
+ set<string> _commandsSafeToPass;
};
Strategy * SINGLE = new SingleStrategy();