[SERVER-32381] The copyDatabase shell helper should take a writeConcern option Created: 18/Dec/17 Updated: 30/Jul/19 Resolved: 30/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | asdf01 | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | Dev Tools 2019-08-12 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 30/Jul/19 ] | ||||
|
michael.qiu@wdtl.com - Please be aware that the copydb functionality is being removed in MongoDB 4.2, after its deprecation in 4.0. Given that, we will not be making changes to the shell helpers, especially given that there is an adequate workaround via the above runCommand discussion. For additional information, please see https://docs.mongodb.com/master/release-notes/4.2-compatibility/#remove-support-for-the-copydb-and-clone-commands I'm going to close this ticket now, but please follow up if we can provide any additional assistance. | ||||
| Comment by Mark Agarunov [ 21/Dec/17 ] | ||||
|
Hello michael.qiu@wdtl.com, Thank you for the additional information. Note that the writeConcern is an option passed to db.runCommand, not to copydb and can be passed to other commands executed with db.runCommand. However, as you noted neither the documentation for copydb nor db.runCommand mentions the writeConcern option so I've opened Thanks, | ||||
| Comment by asdf01 [ 19/Dec/17 ] | ||||
|
Thanks for looking into this query.
It is a feature suggestion: add write concern to the db.copyDatabase operation. In this particular case, it looks like the feature already exists in the alternative copydb command. However no one outside the mongodb organisation is going to know about this feature if mongodb doesn't add it to its documentation. If you even bothered to look at the copydb page you referenced, you'll notice that there is no mention of writeConcern on there. So instead of telling me to go away to some other forum, maybe your organization should be grateful that I brought this issue to your attention and take this opportunity to raise a documentation bug. Thanks | ||||
| Comment by Mark Agarunov [ 19/Dec/17 ] | ||||
|
Hello michael.qiu@wdtl.com, Thank you for the report. To use writeConcern on the copyDatabase operation, you can execute the command with db.runCommand on the admin database using the copydb command (which db.runCommand is a wrapper around):
Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group. Thanks, | ||||
| Comment by asdf01 [ 18/Dec/17 ] | ||||
|
Another way to avoid this problem is if we could throttle the copyDatabase operation some how. Is this possible? Thanks. |