Hi all,
on stated in subject, I'm trying that upgrade, as you know mongodb-driver-sync
has no CVE, is simpler, is mantained and is much more performant.
I would like to share with you that the code in MongoDocumentStore like this:
if (secondariesWithinAcceptableLag()) {
dbCollection = getDBCollection(collection);
} else {
lagTooHigh();
dbCollection =
getDBCollection(collection).withReadPreference(ReadPreference.primary());
}
will be replaced simply with this:
dbCollection = getDBCollection(collection);
because mongodb-driver-sync knows itself if ask to primary or secondary based
on maxStalenessSeconds property
(https://www.mongodb.com/docs/drivers/java/sync/current/fundamentals/connection/connection-options/)
ReplicaSetStatus class too has not much more sense I think, for sure its method
updateLag
Have you some opinion you want to share?
Bye
Cordiali saluti / Best regards,
Raffaele Gambelli
Senior Java Developer
E [email protected]<mailto:[email protected]>
[CEGEKA] Via Ettore Cristoni, 84
IT-40033 Bologna (IT),Italy
T +39 02 2544271
WWW.CEGEKA.COM<https://www.cegeka.com>
[https://signature.cegeka.com/SignatureRO/bannerRO.jpg]