Shell auto-completion blocks when listCollection is waiting for locks

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.1.11
    • Affects Version/s: None
    • Component/s: Shell
    • ALL
    • v4.0
    • Service Arch 2019-04-22
    • 6
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            A. Jesse Jiryu Davis
            Reporter:
            Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: