We currently give each Command a name and an oldName (see here). The oldName is only used to register the command into a map. This limits our command infrastructure and makes it difficult to describe commands externally (e.g. via failpoints). We should do the following:
- Modify Commands to have a name that is used to quickly identify a Command and a list of aliases that can also be used to invoke a function. We should keep both of these locally so that a Command can list all names by which it can be invoked.
- Add a helper to Command that checks if a given name is in its list. (Perhaps by invoking the CommandRegistry::findCommand() function and comparing pointers.)
- Change CommandHelpers::shouldActivateFailCommandFailPoint() to take a proper Command::Invocation* and invoke the helper instead of doing a simple string comparison.
- is duplicated by
-
SERVER-44414 failCommand fail point does not work for ismaster
- Closed