-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.7.0
-
Component/s: Replication
-
None
-
Environment:Ubuntu 10.04 x86_64 running Mongodb 1.7.0 built from src.
-
Linux
mongoimport reports 'imported n objects' when connected to secondary replica member - but has actually imported nothing. This is misleading. It should produce an error.
$ mongo --port 27018 test
> db.isMaster()
{
"setName" : "rep0",
"ismaster" : false,
"secondary" : true,
"hosts" : [
"192.168.2.63:27018",
"192.168.2.63:27017"
],
"arbiters" : [
"192.168.2.63:27019"
],
"primary" : "192.168.2.63:27017",
"ok" :
}
> bye
- cat /tmp/bug.dat
0, "xxxxx"
1, "xxxxx"
2, "xxxxx"
3, "xxxxx"
4, "xxxxx"
5, "xxxxx"
6, "xxxxx"
7, "xxxxx"
8, "xxxxx"
9, "xxxxx"
$ mongoimport --port 27018 -f id,val -d test -c bug \
--type csv --file /tmp/bug.dat
connected to: 127.0.0.1:27018
imported 10 objects
$ mongo --port 27018 test
> db.getMongo().setSlaveOk()
> show collections
(nothing)