]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: do not forward other mon's requests to other mons
authorSage Weil <sage@inktank.com>
Thu, 25 Apr 2013 23:47:15 +0000 (16:47 -0700)
committerSage Weil <sage@inktank.com>
Thu, 25 Apr 2013 23:47:15 +0000 (16:47 -0700)
commit2146930ef01dd39fe0426e53360b89fe19382f2c
tree1b26fcf86ddde63dc4a5f54481291d8b1b5b4199
parent3ce35a6743e050bf0de5abd5ad32f522c5664f3d
mon: do not forward other mon's requests to other mons

The request forwarding infrastructure is there for client requests.
However, we (ab)use it for mon's sending MLog messages: LogClient sends an
MLog message to itself, and that is either handled locally (if leader) or
forwarded to the leader.

If that races with an election, we were forwarding an MLog from another mon
to the leader.  This is not necessary; the original MLog sender will resend
the request on election_finish() to the latest leader.

The fix is to adjust forward_request_leader() to only forward messages from
a mon if that mon is itself.

This was reproduced while testing the fix for #4748.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/Monitor.cc