moped
moped copied to clipboard
Lower refresh_interval default from 300 to 10 sec
Current default is too high- if a failover occurs, an existing connection won't detect a new PRIMARY for potentially up to 300 seconds.
I propose changing the default to 10 or 5 seconds. See Durran's code here for reference: https://github.com/mongodb/mongo-ruby-driver/blob/89733bc5cfab5b82228d663c285135f2deea6cd0/lib/mongo/server/monitor.rb#L28-L58
Coverage increased (+0.0%) when pulling 6b744eb363c3498c9df012d18cd409feb9ae9888 on chrischang12:master into 2d92a6b9df638ed6b32843323cf795744a422f3d on mongoid:master.
i'd be happy to provide a test that demonstrates the behavior, let me know if that's necessary
That might make sense , however we probably will need a major/minor release for this change.