[SERVER-19856] Register for PRESHUTDOWN notifications on Windows Vista+ Created: 10/Aug/15  Updated: 19/Sep/15  Resolved: 13/Aug/15

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 3.0.5
Fix Version/s: 3.0.6, 3.1.7

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: Windows
Backport Completed:
Sprint: Platform 8 08/28/15
Participants:

 Description   

In Windows Vista, Microsoft changed the definition of SERVICE_CONTROL_SHUTDOWN such that there is a global OS timeout so that machines shutdown faster. In this case, the OS automatically terminates services that exceed the global timeout (typically 3 or 12 seconds). The services cannot veto this.

For data sensitive applications like databases, the correct event to register for is SERVICE_CONTROL_PRESHUTDOWN which allows applications to ask for longer timeouts via ChangeServiceConfig2 during installation, and forces Windows to wait for the service to stop or timeout. The default is 5 minutes.



 Comments   
Comment by Githook User [ 13/Aug/15 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-19856: Register for PRESHUTDOWN notifications on Windows Vista+

(cherry picked from commit a694a774259e44024697f4763784b59b2ba8b85d)
Branch: v3.0
https://github.com/mongodb/mongo/commit/1e9821f9177dc5d8602d9f41b38edc0b0269fb6c

Comment by Githook User [ 13/Aug/15 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-19856: Register for PRESHUTDOWN notifications on Windows Vista+
Branch: master
https://github.com/mongodb/mongo/commit/a694a774259e44024697f4763784b59b2ba8b85d

Generated at Thu Feb 08 03:52:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.