[SERVER-45105] Keep supporting finalize: null in mapReduce command Created: 12/Dec/19 Updated: 29/Oct/23 Resolved: 18/Dec/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MapReduce |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Ted Tuckman |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | qopt-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Query 2019-12-30 | ||||||||
| Participants: | |||||||||
| Description |
|
A recent commit to master made it an error to pass a null value for the finalize field in a mapReduce command. The error is:
Previous versions of mongod treated this the same as a missing finalize field. Unfortunately, all existing releases of the Java driver trigger this error when there is no finalize function specified by the application. While we could easily update later releases to non include the field instead of sending a null value for it, any existing application that uses a current driver and updates their server will run into this. Please consider continuing to allow a null value for finalize. Update: The driver treats the query, sort, and scope fields similarly: it passes a null value if the application doesn't provide values. ] |
| Comments |
| Comment by Jeffrey Yemin [ 17/Dec/19 ] |
|
Looks good. |
| Comment by Ted Tuckman [ 17/Dec/19 ] |
|
jeff.yemin those seem to be working already with the new implementation. If you look at the test in the above commit I checked all the fields you listed here in this ticket. Let me know if I missed something, otherwise I'll close the ticket. |
| Comment by Jeffrey Yemin [ 17/Dec/19 ] |
|
ted.tuckman do you also plan to change query and sort field expectations? |
| Comment by Githook User [ 17/Dec/19 ] |
|
Author: {'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}Message: |
| Comment by Jeffrey Yemin [ 12/Dec/19 ] |
|
Updated the description with a list of other fields that are handled similarly by the Java driver. |
| Comment by James Wahlin [ 12/Dec/19 ] |
|
Thanks for filing this Jeff. Our recent commit was to switch over from using the legacy mapReduce command implementation to one executed by the aggregation framework. I expect that we can make this change to accommodate drivers. |