From: Loic Dachary <loic@dachary.org>
To: Gregory Farnum <greg@inktank.com>
Cc: Ceph Development <ceph-devel@vger.kernel.org>
Subject: Re: OSD abstract class
Date: Thu, 25 Apr 2013 20:28:38 +0200 [thread overview]
Message-ID: <517975D6.1020904@dachary.org> (raw)
In-Reply-To: <CAPYLRzirdWRaAEDP7UrrgV-AGcj3KoEoHOtC+A7DFYJD7BQbCA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2761 bytes --]
On 04/25/2013 06:45 PM, Gregory Farnum wrote:
> On Thu, Apr 25, 2013 at 1:17 AM, Loic Dachary <loic@dachary.org> wrote:
>> Hi,
>>
>> In the context of the implementation of
>>
>> http://wiki.ceph.com/01Planning/02Blueprints/Dumpling/Erasure_encoding_as_a_storage_backend
>>
>> I'm preparing tests to assert that the modifications that will be made to the existing PG and ReplicatedPG will not introduce regressions. Unless I'm mistaken, there are no unit tests or functional tests for PG or ReplicatedPG at the moment. I thought that it might be useful to add an abstract OSD class from which OSD is derived, to allow a test to derive from it to implement synthetic behavior.
>>
>>
>> I gave it a try and it passes make check successfully. It is a little hairy because I commented out the code instead of removing it to help with rebasing.
>>
>> https://github.com/dachary/ceph/commit/a9eb690a3537c3f844b47e76cde048b084e314eb
>>
>> I'll now try to use it to implement some tests for ReplicatedPG.
>>
>> I would very much appreciate if someone has an advice on the best way to proceed. Even if it's to say : "you're crazy, don't go there ! you're wasting your time, there is a much simpler way !" ;-)
>
> What's your plot here? The OSD is fairly large to be doing unit tests
> on (although it's not insensible) — but if we want to form a new PG it
> might be best to start out by making abstract PG implementations.
>
My reasoning was that to for a new PG it was enough to rely on
https://github.com/ceph/ceph/blob/master/src/osd/PG.h
and create a new ErasureEncodingPG.{cc,h} after
https://github.com/ceph/ceph/blob/master/src/osd/ReplicatedPG.cc
Since ReplicatedPG is the only class derived from PG, I assumed there will be a need to move code from ReplicatedPG to PG and vice versa to make sure PG can actually be the base class of two different implementations. Are you suggesting that PG should be abstracted ? Is there a reason why it would not be a good base class for a new ErasureEncodedPG ?
> That'll be a bit easier since I believe I they only access the
> OSDService now, and not the OSD proper.
Indeed :-) It will be a lot easier to write an OSDService abstract class to be derived for test purposes. It is much more complicated to do the same with OSD. And probably not necessary since PG's only access OSD thru OSDService.
Thanks a thousand time for the tip :-)
> -Greg
> Software Engineer #42 @ http://inktank.com | http://ceph.com
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Loïc Dachary, Artisan Logiciel Libre
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2013-04-25 18:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-25 8:17 OSD abstract class Loic Dachary
2013-04-25 16:45 ` Gregory Farnum
2013-04-25 18:28 ` Loic Dachary [this message]
2013-04-25 19:47 ` Gregory Farnum
2013-04-25 20:20 ` Loic Dachary
2013-04-26 1:05 ` Samuel Just
2013-05-04 23:27 ` 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=517975D6.1020904@dachary.org \
--to=loic@dachary.org \
--cc=ceph-devel@vger.kernel.org \
--cc=greg@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.