[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use of GNATSDB
From: |
Lars Henriksen |
Subject: |
Re: use of GNATSDB |
Date: |
Fri, 17 May 2002 20:13:03 +0200 |
User-agent: |
Mutt/1.3.25i |
On Fri, May 17, 2002 at 10:31:10AM -0700, Dirk Bergstrom wrote:
> On 5/17/2002 5:03 AM, this issued forth from the mind of Lars Henriksen:
> > I can't reproduce this behaviour. Whether GNATSDB is set or not, the command
> > "pr-edit --lockdb" seems to lock nothing at all. Neither does "pr-edit
> > --database=<db> --lockdb". On the other hand, "pr-edit --lock <user> <PR>"
> > honors GNATSDB as well as the --database option.
>
> this is a totally different issue.
Is it? The issue is how or whether GNATSDB is honered by (for example) pr-edit
and it was claimed, without reservations, that it always ended up locking
the default database. As far as I can see, you confirm below that this is
not the case.
> so in pr-edit, the "network mode" lockdb code opens a socket to gnatsd
> and issues a LKDB command, and gnatsd locks the database.
...
> in "localhost
> mode", pr-edit makes a call to gnats_lock() (actually, it calls foo,
> which calls bar, which calls gnats_lock), which is the same call that
> gnatsd makes. this *does* lock the database, but then, at the very end
> of main(), there's a check that says something like:
>
> if (gnats_locked) {
> unlock_gnats()
> }
>
> this check is entirely reasonable, if you're trying to do an edit, or an
> append, but it's just wrong if you're trying to lock the database.
Thanks for the explanations. They agree with my observations.
> so, you happen to have run into one of the many, many subtle and
> outrageous bugs in localhost mode. this is why i counsel people to
> *always* use network mode, even when talking to a local database.
But of course you are right that this behaviour has nothing to do with GNATSDB.
> how, you ask, do you make sure you're using network mode? by specifying
> either --host or --port or both.
Or by setting GNATSDB to point to the remote database.
Lars Henriksen