Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35638

Shell auto-completion blocks when listCollection is waiting for locks

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

      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:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: