Article View: news.software.nntp
Article #18060Re: Crosspost Lag?
From: Jerry Aguirre
Date: Wed, 28 May 1997 00:00
Date: Wed, 28 May 1997 00:00
29 lines
2038 bytes
2038 bytes
In article <338BF73D.1D72668F@spinne.com>, Jeff Garzik <jeff.garzik@spinne.com> wrote: >John Chapman wrote: >I scanned the source a week ago or so, and it seemed like crosspost >would benefit from putting an additional stat call (to check and see if >a file exists and is a directory) before before the call to [I think] >MakeSpoolDir(). It blindly calls mkdir() for each article's home dir, >whether the directory exists or not, and exits with success if the >mkdir() fails... Why not just stat the darn thing? Trusting mkdir() >error reporting seems flaky as well. I think you will find that crosspost first attempts to just create the hard link on the assumption that the directory already exists. This is based on the idea that the directory only needs to be created once and thus most of the time worrying about the directory would be a waste of time. Thus the most common case is optimized. You can argue about what should happen when the directory does NOT exist but consider that should only happen once. Your trying to optimize something that happens very infrequently. BTW, the code in crosspost is an attempt to copy the exact logic used by innd in creating links for cross posted articles. I think that a good case was made that innd and crosspost could be a little smarter about checking error codes. In some cases the next action is dictated by what the error code is such as when the directory doesn't exist.
Technical Details
Message-ID:
<5mhsao$8t7$1@fes.whowhere.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<5mf7fh$mnb$1@berlin.infomatch.com> <338BF73D.1D72668F@spinne.com>Show Full Headers
Complete Article Headers
Message-ID: <5mhsao$8t7$1@fes.whowhere.com> Subject: Re: Crosspost Lag? Date: Wed, 28 May 1997 00:00:00 +0000 From: jerry@rigel.whowhere.com (Jerry Aguirre) References: <5mf7fh$mnb$1@berlin.infomatch.com> <338BF73D.1D72668F@spinne.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 244533985 Organization: WhoWhere?; Mt. View, CA USA Newsgroups: news.software.nntp