[SERVER-35638] Shell auto-completion blocks when listCollection is waiting for locks Created: 16/Jun/18 Updated: 29/Oct/23 Resolved: 26/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Siyuan Zhou | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||||||||||||||
| Sprint: | Service Arch 2019-04-22 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 6 | ||||||||||||||||||||||||
| Description |
|
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>
Using maxTimeMS with listCommand could fix the usability issue. |
| Comments |
| Comment by Githook User [ 26/Apr/19 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: Also resolves |
| Comment by Githook User [ 24/Apr/19 ] |
|
Author: {'email': 'justin.seyster@mongodb.com', 'name': 'Justin Seyster', 'username': 'jseyster'}Message: Revert " This reverts commit f202c4c1ba24b9f561e8b11dac5b04fa0eeb4919. |
| Comment by Githook User [ 24/Apr/19 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: Also resolves |
| Comment by A. Jesse Jiryu Davis [ 19/Apr/19 ] |
| Comment by Alyson Cabral (Inactive) [ 19/Apr/19 ] |
|
I think doing this ticket is valuable. But yes, I think we should also open another ticket. |
| Comment by A. Jesse Jiryu Davis [ 17/Apr/19 ] |
|
alyson.cabral I'm just reading this ticket for the first time. Can you explain what the list collections privilege has to do with this ticket? I thought this ticket's issue was concerned with transactions blocking listCollections, but not anything to do with privileges. Are you suggesting we should open a separate ticket? That ticket would be to enable, for auto-completion, the same privilege workaround we implemented for "show dbs" and "show collections". |
| Comment by Alyson Cabral (Inactive) [ 23/Jan/19 ] |
|
Many users in atlas do not have the list collections privilege. I'm more interested in getting this to work for all of our users in the same way we got show dbs and show collections working. |
| Comment by Gregory McKeon (Inactive) [ 18/Jun/18 ] |
|
Assigning this to neweng to determine if we can just fix this with maxtimems. |
| Comment by Siyuan Zhou [ 16/Jun/18 ] |
|
CC'ing max.hirschhorn for the shell issue. |