]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: use wait_for_commit to reply
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 13 Jul 2023 16:29:25 +0000 (12:29 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 21 Jul 2023 14:09:07 +0000 (10:09 -0400)
commitc2f7fc6f3f974d309b215931a8a201f3b14e1e80
tree60350ec36d54a77175c33bb70eab3b8f1f9646c4
parentdc8c321a3c75f3935b8fa9146b6f0859ad3b6e56
mon: use wait_for_commit to reply

Once PaxosService::refresh is called, the commit is final and will not
be rolled back. We should immediately send out any replies depending on
that event. This avoids a problem where PaxosService::update_from_paxos
indicates the mons need to re-bootstrap (because of a monmap change) and
these pending reply contexts are dropped in PaxosService::restart.

The cherry on top for this change is that mon commands enjoy a shorter
RTT latency as replies are sent out faster. Using the new
bench_commit.py script:

main branch:
        min/max/mean/stddev: 0.015813/0.613919/0.031615/0.024087
        min/max/mean/stddev: 0.015737/0.255008/0.031492/0.017930
        min/max/mean/stddev: 0.014242/0.205763/0.031969/0.018022
        min/max/mean/stddev: 0.014172/0.270256/0.032070/0.021079
        min/max/mean/stddev: 0.017767/0.471187/0.032751/0.025317

this commit:
        min/max/mean/stddev: 0.010476/0.158475/0.026324/0.013662
        min/max/mean/stddev: 0.016866/0.099403/0.027938/0.010508
        min/max/mean/stddev: 0.014013/0.127512/0.026847/0.010340
        min/max/mean/stddev: 0.013098/0.172725/0.028979/0.012998
        min/max/mean/stddev: 0.016934/0.292218/0.029252/0.014904

About a 10-20% reduction in latency.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mon/AuthMonitor.cc
src/mon/ConfigMonitor.cc
src/mon/HealthMonitor.cc
src/mon/KVMonitor.cc
src/mon/LogMonitor.cc
src/mon/MDSMonitor.cc
src/mon/MgrMonitor.cc
src/mon/OSDMonitor.cc