chiark / gitweb /
Count rejections of nochecked articles against nocheck threshold
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 19 Jun 2010 17:01:58 +0000 (18:01 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 19 Jun 2010 17:01:58 +0000 (18:01 +0100)
README.statistics
innduct.h
recv.c

index 6c9b931..794a33d 100644 (file)
@@ -1,6 +1,6 @@
                        START
                        =====
-                         |                               
+                         |
       ,------------------>|<-----------------------------------------------.
       |                          |                                                |
       |                    < article has been deferred already >                  |
       |conn                      |                    END                         |
       |fails;       < nocheck mode >                                      |
       |requeued      yes         no                                       |
-      |.id/bod/nc   /                    |  CHECK                                 |
+      |.id/bod/nc   /                    |CHECK/IHAVE                             |
       |++          |             |offered.ch++                            |
       |            |             |                                        |
-      |            |             |                                        |
+      |            |             |                                        |
    ^^^^^^^^        |             |                                        |
-     at            |                     |                                        |
-     any           |             |                                        |
+     at            |                     |                                        |
+     any           |             |                                        |
      time          |          ______ < peer response > _________          |
                    |      wanted   unwanted   rejected   deferred         |
+                   |              238/338  438/435     439*      436/431          |
                    |                /        |          |           |             |
                    |<-------'                |unwanted  |rejected   |deferred     |
                    |                 | .id++    | .id++     | .id++       |
            < article exists >         |                 |           |             |
             no        yes           ===        ===          `-----------> |
-            |          |            END        END                        |
-             |                 | TAKETHIS                                         |
-            |          |sent.ch/.nc++                                     |
-            |          |                                                  |
-            |          `-------.                                          |
-            |                  |                                          |
+            |          |            END        END                        |
+             |                 |                                                  |
+            |          |TAKETHIS/body                                     |
+            |          |sent.ch/.nc++                                     |
+            |          `-------.                                          |
+            |                  |                                          |
                     |                ______ < peer response > _________           |
-            |           accepted   unwanted   rejected   deferred         |         
+            |           accepted   unwanted   rejected   deferred         |
+                    |           239/235    438*/435*   439/437    436/431*        |
                     |              |           |           |           |          |
             |missing       |accepted   |unwanted   |rejected   |deferred  |
             |.bod/nc++     |.bod/nc++  |.bod/nc++  |.bod/nc++  |.bod/nc++ |
             |              |           |           |           |          |
            ===            ===         ===         ===          `----------'
            END            END         END         END
+
+Response codes are <code from CHECK/TAKETHIS>/<code from IHAVE>
+* indicates response which is forbidden in this context by RFC4644/3977
+
index 273fb5e..5a337cd 100644 (file)
--- a/innduct.h
+++ b/innduct.h
@@ -186,7 +186,7 @@ extern double max_bad_data_ratio;
 extern int max_bad_data_initial;
 
 
-/*----- statistics -----*/
+/*----- article states, and statistics -----*/
 
 typedef enum {      /* in queue                 in conn->sent             */
   art_Unchecked,    /*   not checked, not sent    checking                */
diff --git a/recv.c b/recv.c
index 00ec7bc..b163f9c 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -119,8 +119,11 @@ void article_done(Article *art, int whichcount) {
   if (whichcount>=0 && !art->missing)
     art->ipf->counts.results[art->state][whichcount]++;
 
-  if (whichcount == RC_accepted) update_nocheck(1);
-  else if (whichcount == RC_unwanted) update_nocheck(0);
+  if (whichcount == RC_accepted)
+    update_nocheck(1);
+  else if (whichcount == RC_unwanted ||
+          (whichcount == RC_rejected && art->state == art_Unsolicited))
+    update_nocheck(0);
 
   InputFile *ipf= art->ipf;