[SERVER-32874] Map Reduce Sharded; true- It just writes to one shard Created: 24/Jan/18  Updated: 21/Mar/18  Resolved: 16/Feb/18

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: 3.0 Required
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Rui Ribeiro Assignee: Mark Agarunov
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

I am trying to make a map reduce with sharded option true.
The output collection does not exist before the mapreduce.

I have 8 shards, however when I run the map reduce:
with the output options:
out:

{ "reduce" : "testCollection" , "sharded" : true , "nonAtomic" : false}

,

It is writing just to one shard, instead of balancing through the 8 shards.

Totals
data : 1.03GiB docs : 2768955 chunks : 16
Shard shard0000 contains 0% data, 0% docs in cluster, avg obj size on shard : NaNGiB
Shard shard0001 contains 0% data, 0% docs in cluster, avg obj size on shard : NaNGiB
Shard shard0002 contains 0% data, 0% docs in cluster, avg obj size on shard : NaNGiB
Shard shard0003 contains 0% data, 0% docs in cluster, avg obj size on shard : NaNGiB
Shard shard0004 contains 0% data, 0% docs in cluster, avg obj size on shard : NaNGiB
Shard shard0005 contains 0% data, 0% docs in cluster, avg obj size on shard : NaNGiB
Shard shard0006 contains 100% data, 100% docs in cluster, avg obj size on shard : 400B
Shard shard0007 contains 0% data, 0% docs in cluster, avg obj size on shard : NaNGiB



 Comments   
Comment by Kelsey Schubert [ 16/Feb/18 ]

Hi rribeiro,

We haven’t heard back from you for some time, so I’m going to mark this ticket as resolved. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Regards,
Kelsey

Comment by Mark Agarunov [ 24/Jan/18 ]

Hello rribeiro,

Thank you for the report. To get a better idea of why the you are only seeing data written to one shard, could you please provide the output of

sh.status({verbose:true})

as well as the complete log files from the affected mongod and mongos nodes? This should give some insight into this behavior.

Thanks,
Mark

Generated at Thu Feb 08 04:31:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.