You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Raffaele Gambelli <Ra...@cegeka.com.INVALID> on 2024/10/02 14:49:14 UTC
Working on OAK-9447 - trying to upgrade the obsolete java-mongo-driver with latest mongodb-driver-sync
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 Raffaele.Gambelli@cegeka.com<ma...@cegeka.com>
[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]