Auto-completion after `db.` sends a listCollection to the server, which may be blocked on locks. In 4.0, the lifespan of a lock could be much longer than before due to transactions. When a 'dropDatabase' is waiting on the global lock in X mode which is acquired by an inactive transaction in IX mode, listCollection will be blocked. The behavior is expected, but when a user notices the blocking dropDatabase and wants to inspect and kill the current operation, the user cannot use auto-completion. Otherwise, the shell hangs after the <tab>
> db.cur<tab>
Using maxTimeMS with listCommand could fix the usability issue.
- related to
-
SERVER-41118 Have autocomplete.js handle slow listCollections responses
- Closed
-
SERVER-32942 mongo shell: for users authorized to certain namespace, make discovery easy
- Closed
-
SERVER-36262 mongo shell: allow users to show dbs (on <4.0 versions of the server) without the listDatabases privilege
- Closed