From: Loic Dachary <loic@dachary.org>
To: Samuel Just <sam.just@inktank.com>
Cc: Ceph Development <ceph-devel@vger.kernel.org>
Subject: PGLog::rewind_divergent_log use case
Date: Sat, 08 Jun 2013 10:16:13 +0200 [thread overview]
Message-ID: <51B2E84D.6090001@dachary.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1188 bytes --]
[Note: ceph-devel cc'ed]
Hi Sam,
While trying to create the conditions for the following to happen in PGLog::rewind_divergent_log:
if (p == log.log.begin()) {
// yikes, the whole thing is divergent!
divergent.swap(log.log);
break;
}
https://github.com/ceph/ceph/blob/master/src/osd/PGLog.cc#L355
I created this ( matching the drawing attached ), and the test case works.
{
pg_log_entry_t e;
info.log_tail = log.tail = eversion_t(1, 1);
newhead = eversion_t(1, 3);
e.version = divergent_version = eversion_t(1, 5);
e.soid.hash = 0x9;
divergent_object = e.soid;
e.op = pg_log_entry_t::DELETE;
e.prior_version = prior_version = eversion_t(0, 2);
log.log.push_back(e);
log.head = e.version;
}
https://github.com/dachary/ceph/commit/d592d7f10968c56139cb470a4111ddfbe08a4030#L0R136
But it does not look like a situation that is actually going to happen. I feel something is missing and a hint would be much appreciated :-)
Cheers
--
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.
[-- Attachment #1.2: a.png --]
[-- Type: image/png, Size: 6068 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next reply other threads:[~2013-06-08 8:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-08 8:16 Loic Dachary [this message]
2013-06-10 23:02 ` PGLog::rewind_divergent_log use case Samuel Just
2013-06-11 19:51 ` Loic Dachary
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B2E84D.6090001@dachary.org \
--to=loic@dachary.org \
--cc=ceph-devel@vger.kernel.org \
--cc=sam.just@inktank.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox