The direct shard operation checks currently disallow any database or collection lock acquisition from an external user without sufficient permissions. However, this is also disallowing some standard replica set maintenance operations (replSetStepDown, db.printReplicationInfo, etc) which are only acquiring locks on collections which we know cannot be moved or sharded.
These commands shouldn't be disallowed by the direct shard operation checks because there is no danger of them causing data loss or corruption due to direct access after the collection is moved or sharded.
In order to allow this type of maintenance commands, we should not throw errors on commands which only acquire locks for collections that are local to a shard (those in admin, config, and local databases plus system collections with some exceptions).
- causes
-
SERVER-90438 Coverity analysis defect 155571: Using a moved object
- Closed
- is duplicated by
-
SERVER-89891 Direct shard connections warnings in single shard clusters may be emitted more than once
- Closed