From: Adam C. Emerson Date: Tue, 13 Oct 2020 21:05:58 +0000 (-0400) Subject: rgw/fifo: Catch two instances journaling a new part X-Git-Tag: v16.1.0~837^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a323cf8b15ebc045dfda74d43ab9486c481f32e;p=ceph.git rgw/fifo: Catch two instances journaling a new part If we see another part journaled, just run the journal ourselves. Signed-off-by: Adam C. Emerson --- diff --git a/src/rgw/cls_fifo_legacy.cc b/src/rgw/cls_fifo_legacy.cc index 9741e4c5cfe81..c55888f9e4db7 100644 --- a/src/rgw/cls_fifo_legacy.cc +++ b/src/rgw/cls_fifo_legacy.cc @@ -668,6 +668,18 @@ int FIFO::_prepare_new_part(bool is_head, std::uint64_t tid, optional_yield y) << " entering: tid=" << tid << dendl; std::unique_lock l(m); std::vector jentries = { info.next_journal_entry(generate_tag()) }; + if (info.journal.find(jentries.front().part_num) != info.journal.end()) { + l.unlock(); + ldout(cct, 5) << __PRETTY_FUNCTION__ << ":" << __LINE__ + << " new part journaled, but not processed: tid=" + << tid << dendl; + auto r = process_journal(tid, y); + if (r < 0) { + lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__ + << " process_journal failed: r=" << r << " tid=" << tid << dendl; + } + return r; + } std::int64_t new_head_part_num = info.head_part_num; auto version = info.version;