× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
SachinPrakash reported 2014-04-08T18:51:18Z  · tomconrad last modified 2018-03-13T16:54:16Z

MongoDB 2.6 - changes to conn pool


Dev
QA
Jenny Nishimura
JennyNishimura
Priority Major
Complexity Unknown
Component MongoSQL
Version Future - PM

https://github.com/mongodb/mongo-java-driver/releases

Review changes to conn pooling, including query termination & specify any impacts

 

  • The driver's connection pool no longer supports connection affinity to threads. Previous versions of the driver tried to provide a given thread the same connection to a MongoDB server as was provided to it the last time it requested one. This was done on a best effort, so that if the max pool size was less than the number of threads using a MongoClient instance, connections would be shared amongst those threads and there would be no guarantee of any connection affinity. But if the max pool size was greater or equal to the number of threads, then effectively each thread would have its own dedicated connection.
    In this release the connection affinity has been removed as part of a re-write of the connection pool. While this will have no effects on most driver users, it will have ramifications for some:
    • For applications that access mongos servers through a load balancer, ensure that the load balancer is configured according to the guidelines for client affinity. If the load balancer is instead configured to allocate connections to mongos servers with the least load or in a round-robin fashion, applications are more likely to experience failures when iterating query results.
    • For applications using unacknowledged writes and subsequently calling WriteResult.getLastError(directly or indirectly, through any of the now-deprecated methods in WriteResult). Even in previous versions of the driver, this call could fail if the connection was "stolen" by another thread, but the removal of connection affinity makes failure of this method more likely. To avoid any issues, replace calls to any of the deprecated methods in the WriteResult class with anacknowledged write, which will throw an exception if the write fails. Note that if you are constructing MongoClient instances (rather than deprecated Mongo instances) the driver will default to using acknowledged writes.

Issue #11890

New
 
 
Completion
No due date
No fixed build
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017