From: Jeff Garzik <jeff@garzik.org>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: Re: chunkd self-check question
Date: Thu, 03 Dec 2009 00:32:36 -0500 [thread overview]
Message-ID: <4B174D74.8080407@garzik.org> (raw)
In-Reply-To: <20091202205532.208edab6@redhat.com>
On 12/02/2009 10:55 PM, Pete Zaitcev wrote:
> I need a way to scan all objects that an Chunk node keeps. There's
> a function that does it already: fs_list_objs. Looking at it, is there
> a reason why it uses readdir instead of tchdbiternext?
The TC database master.tch stores table data, not object data.
master.tch is a (table name)->(table identifier) lookup table.
The object "database" remains 100% filesystem-based, with a fixed-length
metadata header prepended to each object.
That means per-object lookup and retrieval is super-quick, with the
kernel's pagecache and i/dcaches working hard for us.
However, the list-objects operation requires that we open each object's
file, and read the fixed-length metadata header. Objects not belonging
to the authenticated user are then discarded from the list-objects output.
A truly server-punishing operation -- opening and reading EVERY file's
fixed length header -- but the thought was that list-objects would be so
infrequent (once daily? once per cluster boot?) that it would not
matter much.
If that assumption turns out to be invalid or unwise, we can certainly
change things (see below).
> In case of
> self-checking, scanning directories is undesirable, because if an
> object somehow (e.g. a hardware failure) ends existing in filesystem
> but without a corresponding entry in the TC database, it will incorrectly
> count as present.
I had considered storing object metadata in an additional TC database,
for a couple reasons: much faster list-objects and object metadata
retrieval, and storage of small objects.
If some future chunkd stores object metadata in a TC database, yes,
inconsistencies could arise.
Jeff
prev parent reply other threads:[~2009-12-03 5:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 3:55 chunkd self-check question Pete Zaitcev
2009-12-03 5:32 ` Jeff Garzik [this message]
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=4B174D74.8080407@garzik.org \
--to=jeff@garzik.org \
--cc=hail-devel@vger.kernel.org \
--cc=zaitcev@redhat.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.