MongoDB Java driver: autoConnectRetry -


our current connection configuration looks this:

mongoclientoptions.builder()     .autoconnectretry(true).maxautoconnectretrytime(1200000)     .sockettimeout(30000).connecttimeout(15000).build();      // sockettimeout: 30s, connectiontimeout 15s, reconnectretry: 20min 

autoconnectretry , maxautoconnectretrytime deprecated in current version (source code) , removed: "there no replacement method. use connecttimeout property control connection timeout."

i thought retries , connection timeouts 2 different things. know why changed , (internal) implications has?

there lot of confusion meaning of autoconnectretry. people think means that, if operation failed due ioexception, driver retry operation until maxautoconnectretrytime elapsed. not case.

all means that, on calls socket.connect(), driver retries failed attempt connect until maxautoconnectretrytime elapsed. connecttimeout for. additional capability of autoconnectretry can specify longer connect timeout allowed underlying operating system (which typically enforces max connect timeout caps value user specifies).

due confusion, lack of value of feature, , fact none of other mongodb drivers support feature, decided deprecate (and remove in next major release).


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -