From: Sage Weil Date: Fri, 13 Nov 2015 18:03:16 +0000 (-0500) Subject: mon/MonClient: make _sub_got behave if we "got" old stuff X-Git-Tag: v10.0.1~26^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=57121dbe2cbbbd188c9aff38a3a534df038982c9;p=ceph.git mon/MonClient: make _sub_got behave if we "got" old stuff Signed-off-by: Sage Weil --- diff --git a/src/mon/MonClient.h b/src/mon/MonClient.h index 70b84b3537d6..c3efd78f8666 100644 --- a/src/mon/MonClient.h +++ b/src/mon/MonClient.h @@ -231,15 +231,19 @@ private: } void _sub_got(string what, version_t got) { if (sub_new.count(what)) { - if (sub_new[what].flags & CEPH_SUBSCRIBE_ONETIME) - sub_new.erase(what); - else - sub_new[what].start = got + 1; + if (sub_new[what].start <= got) { + if (sub_new[what].flags & CEPH_SUBSCRIBE_ONETIME) + sub_new.erase(what); + else + sub_new[what].start = got + 1; + } } else if (sub_sent.count(what)) { - if (sub_sent[what].flags & CEPH_SUBSCRIBE_ONETIME) - sub_sent.erase(what); - else - sub_sent[what].start = got + 1; + if (sub_sent[what].start <= got) { + if (sub_sent[what].flags & CEPH_SUBSCRIBE_ONETIME) + sub_sent.erase(what); + else + sub_sent[what].start = got + 1; + } } } void _sub_unwant(string what) {