]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
monc: backoff the timeout period when reconnecting
authorGreg Farnum <greg@inktank.com>
Wed, 12 Feb 2014 21:51:48 +0000 (13:51 -0800)
committerGreg Farnum <greg@inktank.com>
Tue, 25 Feb 2014 19:40:28 +0000 (11:40 -0800)
commit9be395e870c50d97604ef41f17667cc566fd84e1
tree760f190c3273b278e2a5d140349d9da1ba0234ca
parent8f4c20bdab153d1603cc99186d8d3e3970aa8976
monc: backoff the timeout period when reconnecting

If the monitors are systematically slowing down, we don't want to spam
them with reconnect attempts every three seconds. Instead, every time
we issue a reconnect, multiply our timeout period by a configurable; when
we complete the connection, reduce that multipler by 50%. This should let
us respond to monitor load.
Of course, we don't want to do that for initial startup in the case of a
couple down monitors, so don't apply the backoff until we've successfully
connected to a monitor at least once.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 794c86fd289bd62a35ed14368fa096c46736e9a2)
src/common/config_opts.h
src/mon/MonClient.cc
src/mon/MonClient.h