summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-03-20 23:46:19 -0400
committerEliot Horowitz <eliot@10gen.com>2010-03-20 23:46:19 -0400
commit7a118d59f26c596f509d2d2f422588992e1ed1eb (patch)
tree8ce37c6aa9e87ed87d6ec4d3cf8e125a647d94ed
parent1535b29e7518d6055d768f77c40210249a938992 (diff)
downloadmongo-7a118d59f26c596f509d2d2f422588992e1ed1eb.tar.gz
sharding debuggin
-rw-r--r--jstests/sharding/key_many.js15
-rw-r--r--s/chunk.cpp2
-rw-r--r--s/config.cpp2
-rw-r--r--s/request.cpp2
-rw-r--r--s/server.cpp4
5 files changed, 15 insertions, 10 deletions
diff --git a/jstests/sharding/key_many.js b/jstests/sharding/key_many.js
index 43e7cc5454e..d1644ac53dc 100644
--- a/jstests/sharding/key_many.js
+++ b/jstests/sharding/key_many.js
@@ -1,13 +1,14 @@
// key_many.js
// values have to be sorted
-types =
- [ { name : "string" , values : [ "allan" , "bob" , "eliot" , "joe" , "mark" , "sara" ] , keyfield: "k" } ,
- { name : "double" , values : [ 1.2 , 3.5 , 4.5 , 4.6 , 6.7 , 9.9 ] , keyfield : "a" } ,
- { name : "string_id" , values : [ "allan" , "bob" , "eliot" , "joe" , "mark" , "sara" ] , keyfield : "_id" },
- { name : "embedded" , values : [ "allan" , "bob" , "eliot" , "joe" , "mark" , "sara" ] , keyfield : "a.b" } ,
- { name : "embedded 2" , values : [ "allan" , "bob" , "eliot" , "joe" , "mark" , "sara" ] , keyfield : "a.b.c" } ,
- { name : "object" , values : [ {a:1, b:1.2}, {a:1, b:3.5}, {a:1, b:4.5}, {a:2, b:1.2}, {a:2, b:3.5}, {a:2, b:4.5} ] , keyfield : "o" } ,
+types = [
+ { name : "string" , values : [ "allan" , "bob" , "eliot" , "joe" , "mark" , "sara" ] , keyfield: "k" } ,
+ { name : "double" , values : [ 1.2 , 3.5 , 4.5 , 4.6 , 6.7 , 9.9 ] , keyfield : "a" } ,
+ { name : "date" , values : [ new Date( 1000000 ) , new Date( 2000000 ) , new Date( 3000000 ) , new Date( 4000000 ) , new Date( 5000000 ) , new Date( 6000000 ) ] , keyfield : "a" } ,
+ { name : "string_id" , values : [ "allan" , "bob" , "eliot" , "joe" , "mark" , "sara" ] , keyfield : "_id" },
+ { name : "embedded" , values : [ "allan" , "bob" , "eliot" , "joe" , "mark" , "sara" ] , keyfield : "a.b" } ,
+ { name : "embedded 2" , values : [ "allan" , "bob" , "eliot" , "joe" , "mark" , "sara" ] , keyfield : "a.b.c" } ,
+ { name : "object" , values : [ {a:1, b:1.2}, {a:1, b:3.5}, {a:1, b:4.5}, {a:2, b:1.2}, {a:2, b:3.5}, {a:2, b:4.5} ] , keyfield : "o" } ,
]
s = new ShardingTest( "key_many" , 2 );
diff --git a/s/chunk.cpp b/s/chunk.cpp
index 2017c4ed456..73d17d97a35 100644
--- a/s/chunk.cpp
+++ b/s/chunk.cpp
@@ -234,6 +234,8 @@ namespace mongo {
if ( _dataWritten < MaxChunkSize / 5 )
return false;
+
+ log(1) << "\t want to split chunk : " << this << endl;
_dataWritten = 0;
diff --git a/s/config.cpp b/s/config.cpp
index 5b1405f3f84..4cc8ff25f01 100644
--- a/s/config.cpp
+++ b/s/config.cpp
@@ -129,6 +129,8 @@ namespace mongo {
void DBConfig::unserialize(const BSONObj& from){
_name = from.getStringField("name");
+ log(1) << "DBConfig unserialize: " << _name << " " << from << endl;
+
_shardingEnabled = from.getBoolField("partitioned");
_primary = from.getStringField("primary");
diff --git a/s/request.cpp b/s/request.cpp
index a111680c020..02ada3cf376 100644
--- a/s/request.cpp
+++ b/s/request.cpp
@@ -74,7 +74,7 @@ namespace mongo {
void Request::process( int attempt ){
- log(2) << "Request::process ns: " << getns() << " msg id:" << (int)(_m.data->id) << " attempt: " << attempt << endl;
+ log(3) << "Request::process ns: " << getns() << " msg id:" << (int)(_m.data->id) << " attempt: " << attempt << endl;
int op = _m.data->operation();
assert( op > dbMsg );
diff --git a/s/server.cpp b/s/server.cpp
index f8167dbc46a..9424f4d9297 100644
--- a/s/server.cpp
+++ b/s/server.cpp
@@ -47,10 +47,10 @@ namespace mongo {
assert( 0 );
return false;
}
-
+
void usage( char * argv[] ){
out() << argv[0] << " usage:\n\n";
- out() << " -v+ verbose\n";
+ out() << " -v+ verbose 1: general 2: more 3: per request 4: more\n";
out() << " --port <portno>\n";
out() << " --configdb <configdbname>,[<configdbname>,<configdbname>]\n";
out() << endl;