[SERVER-1223] Mongod should not have to perform cleanup when doing mongod --install/--remove Created: 11/Jun/10  Updated: 11/Jun/10  Resolved: 11/Jun/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.4.2, 1.4.3, 1.5.0, 1.5.1, 1.5.2
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Justin Dearing Assignee: Eliot Horowitz (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

any windows environment


Participants:

 Description   

When you install or remove mongod as a service, the standard shutdown sequence occurs as if mongod actually ran. Illustrated below.

It should be ensured that mongod is not actually starting up, and then remove the calls to the mongod shutdown sequence.

D:\justin's projects\mongo>db\Debug\mongod --remove
warning: some regex utf8 things will not work. pcre build doesn't have --enable-unicode-properties
Fri Jun 11 16:50:29 dbexit:
Fri Jun 11 16:50:29 shutdown: going to close listening sockets...
Fri Jun 11 16:50:29 shutdown: going to flush oplog...
Fri Jun 11 16:50:29 shutdown: going to close sockets...
Fri Jun 11 16:50:29 shutdown: waiting for fs preallocator...
Fri Jun 11 16:50:29 shutdown: closing all files...
Fri Jun 11 16:50:29 closeAllFiles() finished
8 mutexes in program
exit
LastErrorHolder
getNonce
BackgroundJob
rw:mmmutex
Logstream
Ports
ListeningSockets
Fri Jun 11 16:50:29 dbexit: really exiting now

D:\justin's projects\mongo>db\Debug\mongod --install
warning: some regex utf8 things will not work. pcre build doesn't have --enable-unicode-properties
Fri Jun 11 16:50:35 dbexit:
Fri Jun 11 16:50:35 shutdown: going to close listening sockets...
Fri Jun 11 16:50:35 shutdown: going to flush oplog...
Fri Jun 11 16:50:35 shutdown: going to close sockets...
Fri Jun 11 16:50:35 shutdown: waiting for fs preallocator...
Fri Jun 11 16:50:35 shutdown: closing all files...
Fri Jun 11 16:50:35 closeAllFiles() finished
8 mutexes in program
exit
LastErrorHolder
getNonce
BackgroundJob
rw:mmmutex
Logstream
Ports
ListeningSockets
Fri Jun 11 16:50:35 dbexit: really exiting now



 Comments   
Comment by Justin Dearing [ 11/Jun/10 ]

Mongo should not have opened any listening sockets, or opened any files.

Running through the shutdown sequence when only interacting with the SCM seems to be slightly less overkill than doing so when running mongod -h.

However, if you feel the checks are necessary, in case in scm interaction becomes more complicated I'll not push the issue further.

Comment by Eliot Horowitz (Inactive) [ 11/Jun/10 ]

each piece closes the resources it may or may not have opened.
this is correct

Generated at Thu Feb 08 02:56:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.