[SERVER-12389] insert to not sharded collection, insert to different singleShard Created: 17/Jan/14  Updated: 10/Dec/14  Resolved: 05/Aug/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Jack Glowacki Assignee: Thomas Rueckstiess
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Hi,

Im trying insert document to not sharded database.

{  "_id" : "score",  "partitioned" : false,  "primary" : "t2" }

so i`m conecting to mongos, doin inserts, but documents count in collecion is diffrerent than count of input.

There is a array returned by insert command:

{"singleShard":"t1\/10.0.9.1:27017,10.0.9.2:27017","n":0,"lastOp":{"sec":1389944912,"inc":404},"connectionId":215537,"err":null,"ok":1}
{"singleShard":"t1\/10.0.9.1:27017,10.0.9.2:27017","n":0,"lastOp":{"sec":1389944912,"inc":435},"connectionId":215537,"err":null,"ok":1}
{"singleShard":"t1\/10.0.9.1:27017,10.0.9.2:27017","n":0,"lastOp":{"sec":1389944912,"inc":441},"connectionId":215537,"err":null,"ok":1}
{"singleShard":"t2\/10.0.9.3:27017,10.0.9.4:27017","n":0,"lastOp":{"sec":1389944912,"inc":162},"connectionId":199872,"err":null,"ok":1}
{"singleShard":"t2\/10.0.9.3:27017,10.0.9.4:27017","n":0,"lastOp":{"sec":1389944912,"inc":168},"connectionId":199872,"err":null,"ok":1}
{"singleShard":"t2\/10.0.9.3:27017,10.0.9.4:27017","n":0,"lastOp":{"sec":1389944912,"inc":171},"connectionId":199872,"err":null,"ok":1}

why some of inserts are sended to t1 replica set??
This will be synced by balancer or its a bug ??

mongos> version()
2.4.6
t1:PRIMARY> version()
2.4.6
t2:PRIMARY> version()
2.4.6



 Comments   
Comment by Thomas Rueckstiess [ 05/Aug/14 ]

Hi Jack,

I haven't heard back from you so I'm going to close this issue now. If this is still a problem for you please feel free to re-open and provide the additional information.

Thanks,
Thomas

Comment by Thomas Rueckstiess [ 26/Jun/14 ]

Hi Jack,

Sorry for the delay on this ticket. If this is still an issue for you, can you please attach the full output of sh.status() from the mongos in a comment below?

Can you also include the full insert command you used, not just the return values?

Thanks,
Thomas

Generated at Thu Feb 08 03:28:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.