All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: hail-devel@vger.kernel.org
Subject: Re: [PATCH] chunkd: add support for multiple key/value tables
Date: Tue, 10 Nov 2009 09:33:22 -0700	[thread overview]
Message-ID: <20091110093322.313563c2@redhat.com> (raw)
In-Reply-To: <20091110112409.GA31471@havoc.gtf.org>

On Tue, 10 Nov 2009 06:24:09 -0500, Jeff Garzik <jeff@garzik.org> wrote:

> 	LOGIN(user="jgarzik")
> 	TABLE-OPEN(name="tabled")
> 	GET...

2 more turnarounds per session? Brilliant!

The theory behind this is sound: let's not saddle chunkd with caching
authentication results, which is ineffective anyway, but provide
a way for application to amortize the cost of authentication over
a number of requests explicitly. But in practice it means tabled
needs to keep inactive sessions open, which is a chunk of code for
me to write (and debug!). I guess I'll do it in a few months...

> @@ -29,9 +29,15 @@ static void test(bool encrypt)
>  	stc1 = stc_new(TEST_HOST, port, TEST_USER, TEST_USER_KEY, encrypt);
>  	OK(stc1);
>  
> +	rcb = stc_table_openz(stc1, TEST_TABLE, 0);
> +	OK(rcb);
> +
>  	stc2 = stc_new(TEST_HOST, port, TEST_USER2, TEST_USER2_KEY, encrypt);
>  	OK(stc2);

Having a default table? Naah, those lazy application programmers have
it too easy already!

Again, from the point of view of chunkd, this makes complete sense:
why carry an extra (default) table in cases when application does
in fact set its own tables, right?

> +	/*
> +	 * we must supply CHF_TABLE_NEW on the first iteration of
> +	 * this test, because we are the first test in the testsuite,
> +	 * and must create the database to be used by all other tests.
> +	 */
> +	rcb = stc_table_openz(stc, TEST_TABLE,
> +			      ssl ? 0 : CHF_TABLE_NEW);
> +	OK(rcb);

You've got to be kidding me. How is tabled supposed to know that
the request it's making is "first"?! I guess I have to supply
CHF_TABLE_NEW to every call now, or else retry if InvalidTable
is returned, I haven't decided what workaround to apply yet.

-- Pete

  reply	other threads:[~2009-11-10 16:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10 11:24 [PATCH] chunkd: add support for multiple key/value tables Jeff Garzik
2009-11-10 16:33 ` Pete Zaitcev [this message]
2009-11-10 19:45   ` Jeff Garzik
2009-11-10 19:50     ` Jeff Garzik
2009-11-10 20:46       ` chunkd design genesis, storage tech, and " Jeff Garzik
2009-11-11  1:48         ` Pete Zaitcev

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=20091110093322.313563c2@redhat.com \
    --to=zaitcev@redhat.com \
    --cc=hail-devel@vger.kernel.org \
    --cc=jeff@garzik.org \
    /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.