]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/ReplicatedPG: handle misdirected do_command 1664/head
authorSage Weil <sage@inktank.com>
Sun, 13 Apr 2014 05:23:26 +0000 (22:23 -0700)
committerSage Weil <sage@inktank.com>
Sun, 13 Apr 2014 05:23:26 +0000 (22:23 -0700)
commita72bcddfc81254793689612d5615ae572d8f51f7
treeff98c7d1e47c6c88be757ee83cee2446c5d0593a
parentd72602f64f8ce6817544b056c667dea4e2a0449b
osd/ReplicatedPG: handle misdirected do_command

We can get a query on a pg we still have but are no longer primary for.  If
that happens, do not reply.  The client will resend to the correct OSD
assuming it has the map.  Send them the latest incremental so that we know
they know there is something new.  We don't know the exact epoch they have,
unfortunately, because MCommand doesn't include it, but a newer inc is
enough to make them request the right incrementals from a mon.  Eventually
they will figure it out and Objecter will resend the request to the
correct target.

It is possible we should include epoch in the MCommand message so that we
can do this mapping "correctly" (as in, the same way MOSDOp does).  That
makes MCommand less general, though... a PG-specific command message might
be the most precise thing.  Another day...

Fixes: #8085
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc