Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Subject: Re: Protect against servers stepping on each other's toes
Date: Sat, 20 Oct 2001 00:37:08 +0200	[thread overview]
Message-ID: <vafvghbqmsr.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <m3669bl2oy.fsf@multivac.cwru.edu> (prj@po.cwru.edu's message of "Fri, 19 Oct 2001 17:49:59 -0400")

prj@po.cwru.edu (Paul Jarc) writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) wrote:
>> If I have two servers using the same directory, there is potential for
>> the two stepping on each other's toes.
> 
> I think much of this could be prevented by using different defaults
> for different backends, or (like nnmaildir does) by requiring the user
> to explicitly specify a directory in the server parameters.

It's too late now.  Imagine the huge number of people out there with
(nnml "") in their gnus-secondary-select-methods.  So clearly the
default for nnml must be ~/Mail.  And then imagine the other huge
number of people out there with (nnfolder "") in
gnus-secondary-select-methods.  So the default for nnfolder must be
~/Mail.

Or are you trying to say that all these Gnusae should suddenly stop
working unless reconfigured?  I think this is not a viable alternative :-|

>> Here's a suggestion: when a server is first activated, it writes
>> something special to its directory which says what server `owns' that
>> directory.
> 
> Are we trying to protect against two servers in two different
> Emacsen?  If not, we don't need to touch the directory itself.
> Something internal to Gnus would do.

I mean the same Emacs.

The trouble is with people who do this:

(add-to-list 'gnus-secondary-select-methods '(nnml ""))
(add-to-list 'gnus-secondary-select-methods '(nnfolder ""))

See?  This is the situation I was thinking about.

> Is this indicator supposed to stay there all the time, or will it be
> removed when the server is closed?

I guess it should be left there -- after all, my "nnml:" server has
been owning the ~/Mail directory for many years now, and it's not
going to stop tomorrow.

>> But even before that, each server looks to see if some other server
>> has already written that the directory is `owned' by it.  When this
>> happens, a warning is issued or something like that.
> 
> There's a race condition there.  But that's not a problem for two
> servers in the same Emacs.

Right.

>> Also, maybe we want to put the claiming information inthe active
>> file.  Maybe in the directory _and_ in the active file?
> 
> Putting it in both wouldn't provide any additional usefullness.
> Putting it in the active file would mean we aren't protected against
> other Emacsen, but in that case a nonpersistent variable will do; it
> doesn't need to be saved anywhere.

Maybe some crooked mind does something like this:

(add-to-list 'gnus-secondary-select-methods 
             '(nnfolder "a"
                (nnfolder-directory "/tmp/a")
                (nnfolder-active-file "/tmp/active")))
(add-to-list 'gnus-secondary-select-methods 
             '(nnfolder "b"
                (nnfolder-directory "/tmp/b")
                (nnfolder-active-file "/tmp/active")))

Note how they use different directories but the same active file.

But you're right, it seems that it is sufficient to set a variable
value, such as gnus-occupied-directories or something like this.

kai
-- 
GNU/Linux provides a nice `poweroff' command, but where is `poweron'?



  reply	other threads:[~2001-10-19 22:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-19 21:35 Kai Großjohann
2001-10-19 21:49 ` Paul Jarc
2001-10-19 22:37   ` Kai Großjohann [this message]
2001-10-19 22:46     ` Paul Jarc
2001-10-20 11:00       ` Kai Großjohann
2001-10-20  6:48     ` Matt Armstrong
2001-10-20 11:03       ` Kai Großjohann
2001-10-20 21:49         ` Matt Armstrong
2001-10-20 22:02           ` Kai Großjohann
2001-10-22  5:35       ` Paul Jarc
2001-10-22 16:54         ` Matt Armstrong
2001-10-22 20:05           ` Kai Großjohann
2001-10-19 22:42   ` Simon Josefsson

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=vafvghbqmsr.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).