]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: tolerate misordered TMAP updates
authorSage Weil <sage@inktank.com>
Sun, 25 Nov 2012 22:24:08 +0000 (14:24 -0800)
committerSage Weil <sage@inktank.com>
Tue, 27 Nov 2012 22:13:00 +0000 (14:13 -0800)
commit8e91d00b52808aa1a4e3a838deda34a439aabdbb
tree9c4bf7c2d5efd74912dd6d8464278905586297ef
parenta4439f0fccd5d5770d07ebf134980291eeeba4e3
osd: tolerate misordered TMAP updates

The previous tmap implementation requires that the update stream be
sorted or else it will behave erratically (by placing new keys in the
map out of order).  This can cause very strange failures: reads may
appear to return the correct result initially, but once intervening
keys are remove they will not... depending on how read is implemented
on the client side.

Fix this by doing the optimized updates initially, but falling back to
a slow implementation if an unsorted update is detected.  It is slow,
but such updates are rare.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h
src/test/librados/misc.cc