From: Loic Dachary <loic@dachary.org>
To: Samuel Just <sam.just@inktank.com>
Cc: Ceph Development <ceph-devel@vger.kernel.org>
Subject: PGLog API : missing
Date: Thu, 20 Jun 2013 16:38:29 +0200 [thread overview]
Message-ID: <51C313E5.8020408@dachary.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2424 bytes --]
Hi Sam,
I tried to consider the part of the API of PGLog related to pg_missing_t, looking at what it currently is and what it should be. At the moment it is ( not considering the methods that have a side effect on both missing and log ):
Accessor:
const pg_missing_t& get_missing() const { return missing; }
Actors:
void missing_add(const hobject_t& oid, eversion_t need, eversion_t have)
void revise_need(hobject_t oid, eversion_t need) void revise_have(hobject_t oid, eversion_t have)
void missing_got(map<hobject_t, pg_missing_t::item>::const_iterator m)
void missing_rm(map<hobject_t, pg_missing_t::item>::const_iterator m)
The get_missing read only accessor is used in PG.{cc,h}, OSD.{cc,h}, Replicated.{cc,h} It is used in dozen of different ways and I'm not sure if it would make sense to define an API to replace them. I fail to see a pattern that would be useful.
The missing_add method is used by ReplicatedPG::recover_object_replicas and PG::repair_object The revise_have method is used by ReplicatedPG::submit_push_data
The revise_need method is used by ReplicatedPG::mark_all_unfound_lost when handling pg_log_entry_t::LOST_REVERT
The missing_got method is used by ReplicatedPG::mark_all_unfound_lost when handling pg_log_entry_t::LOST_MARK
The missing_rm method is used by ReplicatedPG::mark_all_unfound_lost when handling pg_log_entry_t::LOST_DELETE
All these make sense to me. But I'm looking at what is currently in place rather than thinking about what it should become to accomodate for erasure coding.
With erasure_coding one OSD contains a chunk. If it is lost, it will not be copied from another OSD, it will be repaired by using the content of other OSDs. For instance; if the chunk object 4 version 1,2 is not in OSD 3 the other chunks objects will be fetched from the remaining OSDs, the repair function will then be called using their content to create the chunk object 4 version 1,2. Instead of fetching a copy of the missing object from one OSD, the code would fetch chunk objects from multiple OSDs to be able to repair.
Because pg_missing_t is dealing with the missing objects for a single OSD, it may not need to be modified when used in the context of erasure coding.
Am I making any sense ? I'm not sure ;-)
--
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next reply other threads:[~2013-06-20 14:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 14:38 Loic Dachary [this message]
2013-07-05 23:33 ` PGLog API : missing 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=51C313E5.8020408@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 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.