[SERVER-8154] mongo shell commands are not idempotent Created: 11/Jan/13  Updated: 26/Oct/21  Resolved: 26/Oct/21

Status: Closed
Project: Core Server
Component/s: Admin, Usability
Affects Version/s: None
Fix Version/s: features we're not sure of

Type: Bug Priority: Minor - P4
Reporter: eHarmony Matching Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Participants:

 Description   

In general, commands issued in the mongo client shell are not idempotent. (There are a few user-friendly exceptions, like ensureIndex().) This means that, for example, if I want a given node to be in a given replica set, I cannot simply add it – because if it is already present, the add will fail. Instead, I have to get the current configuration, search for the node I want to exist, and only add it if it is missing. This is not a big deal when typing commands in ad hoc by hand, but it is a barrier to automation.


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