INN commit: trunk (doc/pod/inn.conf.pod nnrpd/group.c)
INN Commit
Russ_Allbery at isc.org
Sun Aug 24 11:25:05 UTC 2008
Date: Sunday, August 24, 2008 @ 04:25:04
Author: iulius
Revision: 7963
Clarify the use of nfsreaderdelay.
Modified:
trunk/doc/pod/inn.conf.pod
trunk/nnrpd/group.c
----------------------+
doc/pod/inn.conf.pod | 14 +++++++-------
nnrpd/group.c | 10 +++++++---
2 files changed, 14 insertions(+), 10 deletions(-)
Modified: doc/pod/inn.conf.pod
===================================================================
--- doc/pod/inn.conf.pod 2008-08-24 11:10:34 UTC (rev 7962)
+++ doc/pod/inn.conf.pod 2008-08-24 11:25:04 UTC (rev 7963)
@@ -578,16 +578,16 @@
on NFS storage. If set, INN will attempt to force articles and
overviews to be read directly from the NFS spool rather than from
cached copies. You should only set this parameter if you are
-attempting to use a shared NFS spool on a machine acting a reader a
-cluster. This is a boolean value and the default is false.
+attempting to use a shared NFS spool on a machine acting as a reader
+within a cluster. This is a boolean value and the default is false.
=item I<nfsreaderdelay>
-For servers reading articles, determine whether the article spool is
-on NFS storage. If I<nfsreader> is set, INN will use the value of
-I<nfsreaderdelay> to delay the apparent arrival time of articles to
-clients by this amount; this value should be tuned based on the NFS
-cache timeouts locally. This default is 60 (1 minute).
+If I<nfsreader> is set, INN will use the value of I<nfsreaderdelay>
+to delay the apparent arrival time of articles to clients by this amount.
+Note that only answers to GROUP and NEWNEWS commands are affected. This
+value should be tuned based on the NFS cache timeouts locally. The default
+is C<60>, that is to say one minute.
=item I<nnrpdcheckart>
Modified: nnrpd/group.c
===================================================================
--- nnrpd/group.c 2008-08-24 11:10:34 UTC (rev 7962)
+++ nnrpd/group.c 2008-08-24 11:25:04 UTC (rev 7963)
@@ -105,16 +105,18 @@
if (count == 0)
Reply("%d 0 1 0 %s\r\n", NNTP_OK_GROUP, group);
else {
- /* if we're an NFS reader, check the last nfsreaderdelay
+ /* if we are an NFS reader, check the last nfsreaderdelay
* articles in the group to see if they arrived in the
- * last nfsreaderdelay (default 60) seconds. If they did,
+ * last nfsreaderdelay (default 60) seconds. If they did,
* don't report them as we don't want them to appear too
- * soon */
+ * soon. */
if (innconf->nfsreader) {
ARTNUM low, prev;
time_t now, arrived;
time(&now);
+ /* We assume that during the last nfsreaderdelay seconds,
+ * we did not receive more than 1 article per second. */
if (ARTlow + innconf->nfsreaderdelay > ARThigh)
low = ARTlow;
else
@@ -129,6 +131,8 @@
while (OVsearch(handle, &i, NULL, NULL, NULL, &arrived)) {
if (arrived + innconf->nfsreaderdelay > now) {
ARThigh = prev;
+ /* No need to update the count since it is only
+ * an estimate. */
break;
}
prev = i;
More information about the inn-committers
mailing list