[SERVER-43578] M/R Agg: Reject mapreduce command sent to mongos with output mode "replace" and sharded: true Created: 23/Sep/19  Updated: 29/Oct/23  Resolved: 04/Nov/19

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

Type: Task Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Mihai Andrei
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-42942 M/R Agg: Implement translation for cl... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2019-11-04, Query 2019-11-18
Participants:

 Comments   
Comment by Nicholas Zolnierz [ 04/Nov/19 ]

I've retitled this ticket to make it clear what we did, further work to fail if a user is expecting MR to create a new sharded collection is being tracked in SERVER-44318.

Comment by Githook User [ 01/Nov/19 ]

Author:

{'name': 'Mihai Andrei', 'email': 'mihai.andrei@mongodb.com'}

Message: SERVER-43578 M/R Agg: Reject mapreduce command sent to mongos which is expected to drop and re-shard the output collection
Branch: master
https://github.com/mongodb/mongo/commit/e5340534df81238e454ce7d3afbb7883115f2c53

Comment by Mihai Andrei [ 30/Oct/19 ]

Per in person discussion with nicholas.zolnierz and james.wahlin, checking the last two conditions (i.e. output mode merge/reduce against a non-existent collection and output mode merge/reduce against an existing sharded collection with zero documents) is somewhat complicated as it requires you to know during $merge execution that you are executing in the context of a mapReduce command. For now, the scope of this ticket will be to prevent running out.sharded: true in output mode replace on a mongos. I filed another ticket (https://jira.mongodb.org/browse/SERVER-44318) to address the other conditions should we want to do so in the future.

Comment by Esha Maharishi (Inactive) [ 24/Sep/19 ]

Reminder: This check cannot happen on mongos!!

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