[JAVA-4629] Lock free server session pool Created: 25/May/22  Updated: 28/Oct/23  Resolved: 31/May/22

Status: Closed
Project: Java Driver
Component/s: Internal, Performance, Session Management
Affects Version/s: None
Fix Version/s: 4.7.0

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

Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed

 Description   

com.mongodb.internal.session.ServerSessionPool currently users com.mongodb.internal.connection.ConcurrentPool to implement its pooling behavior.  ConcurrentPool has synchronization overhead that is unnecessary based on ServerSessionPool usage of it.  We can improve the efficiency of ServerSessionPool by replacing its use of ConcurrentPool with direct usage of ConcurrentLinkedDeque.



 Comments   
Comment by Githook User [ 31/May/22 ]

Author:

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

Message: Improve efficiency of ServerSessionPool (#951)

  • Replace use of ConcurrentPool with direct use of ConcurrentLinkedDeque
  • Only prune on ServerSessionPool#get
  • Cache ClusterDescription#logicalSessionTimeoutMinutes

JAVA-4629
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/6a01ba6aa53f6003d4c427f631ac2efb5b917c18

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