[JAVA-1072] Ensure that scheduled jobs for cluster monitoring use daemon threads Created: 09/Jan/14  Updated: 03/Apr/14  Resolved: 17/Jan/14

Status: Closed
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: None
Fix Version/s: 2.12.0, 3.0.0

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Now that the driver has switched over to ScheduledExecutorService for monitoring the cluster, applications that use the driver no longer exit unless MongoClient is explicitly closed. To fix this, the driver needs to create the service with a thread factory that creates daemon threads.



 Comments   
Comment by Githook User [ 17/Jan/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1072: Created custom thread factory for ScheduledExecutorService that creates deamon threads.
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/1ab908090b56a1bf4cb34f7b65596bebd898f479

Comment by Githook User [ 15/Jan/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1072: Create daemon thread for the scheduled executor service, and while we're at it, prefix the thread name with the cluster id
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/bdbe23a2b7113e9f48188541e5d49e6187662bfe

Generated at Thu Feb 08 08:53:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.