]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
OSD::handle_misdirected_op: handle ops to the wrong shard
authorSamuel Just <sam.just@inktank.com>
Wed, 26 Feb 2014 22:47:39 +0000 (14:47 -0800)
committerSamuel Just <sam.just@inktank.com>
Fri, 28 Feb 2014 19:26:32 +0000 (11:26 -0800)
commitb0d426440bb852792566e54f6420d541af379302
treed5771e0ad199ef162e47c49f6afa0bc08a041ed7
parent07ddfcfa936d4618b5c1ccee3fa4fd9de2b9a036
OSD::handle_misdirected_op: handle ops to the wrong shard

OSD recomputes op target based on current OSDMap. With an EC pg, we can get
this result:
1) client at map 512 sends an op to osd 3, pg_t 3.9 based on mapping
   [CRUSH_ITEM_NONE, 2, 3]/3
2) OSD 3 at map 513 remaps op to osd 3, spg_t 3.9s0 based on mapping [3, 2, 3]/3
3) PG 3.9s0 dequeues the op at epoch 512 and notices that it isn't
   primary -- misdirected op
4) client resends and this time PG 3.9s0 having caught up to 513 gets it and
   fulfils it

We can't compute the op target based on the sending map epoch due to
splitting.  The simplest thing is to detect such cases in
OSD::handle_misdirected_op and drop them without an error (the client
will resend anyway).

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc
src/osd/PG.h