From: Ian Jackson Date: Mon, 3 May 2010 02:00:59 +0000 (+0100) Subject: put flow control notes somewhere sensible X-Git-Tag: innduct-0.1~63 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=innduct.git;a=commitdiff_plain;h=c50d73691be3e03d0d722e4132f0b353b9ca0c1e put flow control notes somewhere sensible --- diff --git a/backends/innduct.c b/backends/innduct.c index b829841..eb8d63a 100644 --- a/backends/innduct.c +++ b/backends/innduct.c @@ -3,26 +3,6 @@ * build-lfs/backends/innduct --connection-timeout=30 --no-daemon -C ../inn.conf -f `pwd`/fee sit localhost */ -/*-- -flow control notes -to ensure articles go away eventually -separate queue for each input file - queue expiry - every period, check head of backlog queue for expiry with SMretrieve - if too old: discard, and check next article - also check every backlog article as we read it - flush expiry - after too long in SEPARATED/DROPPING ie Separated/Finishing/Dropping - one-off: eat queued articles from flushing and write them to defer - one-off: connfail all connections which have any articles from flushing - newly read articles from flushing go straight to defer - this should take care of it and get us out of this state -to avoid filling up ram needlessly - input control - limit number of queued articles for each ipf - pause/resume inputfile tailing ---*/ - /* * Newsfeeds file entries should look like this: * host.name.of.site[/exclude,exclude,...]\ @@ -1539,6 +1519,26 @@ static void conn_maybe_write(Conn *conn) { /*---------- expiry, flow control and deferral ----------*/ +/* + * flow control notes + * to ensure articles go away eventually + * separate queue for each input file + * queue expiry + * every period, check head of backlog queue for expiry with SMretrieve + * if too old: discard, and check next article + * also check every backlog article as we read it + * flush expiry + * after too long in SEPARATED/DROPPING ie Separated/Finishing/Dropping + * one-off: eat queued articles from flushing and write them to defer + * one-off: connfail all connections which have any articles from flushing + * newly read articles from flushing go straight to defer + * this should take care of it and get us out of this state + * to avoid filling up ram needlessly + * input control + * limit number of queued articles for each ipf + * pause/resume inputfile tailing + */ + static void check_reading_pause_resume(InputFile *ipf) { if (ipf->queue.count >= max_queue_per_ipf) inputfile_reading_pause(ipf);