]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: fix PG::Log::copy_after wrt backlogs (again)
authorSage Weil <sage.weil@dreamhost.com>
Sun, 23 Oct 2011 03:41:03 +0000 (20:41 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 23 Oct 2011 03:41:03 +0000 (20:41 -0700)
commit9323f25a6a6a3b1c86aef260be971e237945b6dc
treeb647ae66e5153bce7fca14280f32ca964e60d724
parent1b846f43f181ac31a1a1911c74b7cf3ae063f35d
osd: fix PG::Log::copy_after wrt backlogs (again)

Commit 68fe748fc2d703623050e8f2a448a0fd31ca8a0f fixed half of this problem,
but set this->tail incorrectly.  If we read olog.tail, the entry we are
on is a backlog entry, and probably not other.tail.  Do not reset tail in
this case because we already set it to other.tail above.

OTOH if we hit v, we do want to set this->tail to the current record as it
is the one that precedes the first log entry.

This fixes an incorrect log.tail send to other nodes, which eventually
propagates as a log bound mismatch.  For example,

2011-10-22 17:33:18.654693 7f8a2fefe700 osd.4 2788 pg[1.1f( v 1627'28 (1627'28,1627'28] n=2 ec=1 les/c 2763/2782 2788/2788/2788) [4,0] r=0 mlcod 0'0 !hml peering] merge_log log(578'5,1627'28] from osd.0 into log(1627'28,1627'28]
2011-10-22 17:33:18.654706 7f8a2fefe700 osd.4 2788 pg[1.1f( v 1627'28 (1627'28,1627'28] n=2 ec=1 les/c 2763/2782 2788/2788/2788) [4,0] r=0 mlcod 0'0 !hml peering] merge_log extending tail to 578'5
2011-10-22 17:33:18.654720 7f8a2fefe700 osd.4 2788 pg[1.1f( v 1627'28 (578'5,1627'28] n=2 ec=1 les/c 2763/2782 2788/2788/2788) [4,0] r=0 (log bound mismatch, empty) mlcod 0'0 !hml peering] merge_log result log(578'5,1627'28] missing(0) changed=1

This might fix #1526.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.cc