summaryrefslogtreecommitdiff
path: root/jstests/sharding
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2012-03-30 21:40:45 +0200
committerAntonin Kral <a.kral@bobek.cz>2012-03-30 21:40:45 +0200
commiteaaa7b30c99b89b5483e0a372bb73fe8c8695185 (patch)
tree6c08f243b00c0f6b7a4897a236774cf484e61314 /jstests/sharding
parentba59b00736b5b8dc0f0bd46397575aaf0cd4d44f (diff)
downloadmongodb-eaaa7b30c99b89b5483e0a372bb73fe8c8695185.tar.gz
Imported Upstream version 2.0.4
Diffstat (limited to 'jstests/sharding')
-rw-r--r--jstests/sharding/shard3.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/jstests/sharding/shard3.js b/jstests/sharding/shard3.js
index e27316e..8ee566e 100644
--- a/jstests/sharding/shard3.js
+++ b/jstests/sharding/shard3.js
@@ -61,7 +61,7 @@ function doCounts( name , total , onlyItCounts ){
}
var total = doCounts( "before wrong save" )
-secondary.save( { num : -3 } );
+secondary.save( { _id : 111 , num : -3 } );
printjson( secondary.getDB().getLastError() )
doCounts( "after wrong save" , total , true )
e = a.find().explain();
@@ -69,6 +69,12 @@ assert.eq( 3 , e.n , "ex1" )
assert.eq( 4 , e.nscanned , "ex2" )
assert.eq( 1 , e.nChunkSkips , "ex3" )
+
+// SERVER-4612
+// make sure idhack obeys chunks
+x = a.findOne( { _id : 111 } )
+assert( ! x , "idhack didn't obey chunk boundaries " + tojson(x) );
+
// --- move all to 1 ---
print( "MOVE ALL TO 1" );