Make :auto-connect-retry connection default to true

Another very unsafe default on the MongoDB Java driver side. Monger puts safety first, fancy
sky high benchmarks second.
This commit is contained in:
Michael S. Klishin 2012-05-28 02:22:46 +04:00
parent 16f14ac39d
commit 5964e01b1d

View file

@ -127,7 +127,7 @@
(defn mongo-options
[& { :keys [connections-per-host threads-allowed-to-block-for-connection-multiplier
max-wait-time connect-timeout socket-timeout socket-keep-alive auto-connect-retry max-auto-connect-retry-time
safe w w-timeout fsync j] }]
safe w w-timeout fsync j] :or [auto-connect-retry true] }]
(let [mo (MongoOptions.)]
(when connections-per-host
(set! (. mo connectionsPerHost) connections-per-host))