[SERVER-38718] mongo shell does not re-check for startup warnings on reconnect Created: 20/Dec/18  Updated: 06/Dec/22  Resolved: 17/Dec/20

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: move-stm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-12743 shell doesn't test server version on ... Backlog
related to SERVER-17374 Shell prompt does not indicate reconn... Backlog
Assigned Teams:
Server Tooling & Methods
Participants:

 Description   

When the mongo shell first starts up, it displays server startup warnings. However, if the server has been stopped and re-started — which might change its startup warnings — the shell does not inform the user of the server's startup warnings when it successfully reconnects. It would be better if it did, so that users/admins are fully informed about the current state of the server before proceeding to perform operations on it.

The naive approach would just be to fetch and re-display all startup warnings on reconnect. However, this would re-display the (unchanged) startup warnings if the network connection is lost. More advanced approaches could include:

  • Attempting to diff the startup warnings compared to previously, and not re-displaying them if they are identical
  • Attempt to distinguish between network disconnects and server restarts by checking the server's uptime (eg. from serverStatus), and only re-showing the startup warnings if the server uptime is less than the length of time that the shell's been disconnected. This is more complex because the shell doesn't notice immediately when the connection is lost.


 Comments   
Comment by Robert Guo (Inactive) [ 17/Dec/20 ]

We will no longer be adding new features to the old mongo shell outside of a small number of exceptions. Please consider switching to the new shell, mongosh for general use cases.

If this ticket is desired for Server development, please reopen.

Comment by Kevin Pulo [ 23/Dec/18 ]

Yep, very similar to both of those, although this is a bit more focussed on the UX problems of not displaying user-relevant warnings.

I would say that all of these are different symptoms of a deeper over-arching "shell reconnect is not equivalent to shell exit/restart" problem. We should probably pick one ticket and reword it accordingly (or file a new one), to make sure that the underlying problem gets solved properly, rather than piecemeal solving of each symptom.

Comment by Asya Kamsky [ 21/Dec/18 ]

And maybe SERVER-17374 also?

Comment by Asya Kamsky [ 21/Dec/18 ]

This is similar to the shell not noticing different version/binary I filed in SERVER-12743 yes?

Generated at Thu Feb 08 04:49:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.