Article delegate-en/391 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A387@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: User cancelled downloading, but DG continued!
02 Apr 1999 09:09:45 GMT ysato@etl.go.jp (Yutaka Sato)


On 04/02/99(13:12) I wrote in <_A387@delegate-en.ML_>
 |HTTP-DeleGate with cache tries to complete a downloading to cache
 |once initiated, even if the client which initiated the downloading
 |disconnected.

A seed of this feature seems to have been from the very first
version of DeleGate/1.1 (Jun94).  The original aim of the feature
was keeping cache be consistent on abortion by a client, because
the recovery (clean up) of broken cache is not supported at the time.

Of course it will be valuable not to entirely discard partially
downloaded data when, for example, 99% of whole data is downloaded.

Maybe also it was intended to realize long time downloading in
"background" when HTTP clients at the time (i.e. Mosaic) did not
support background downloading.


 | |My question is: have I forget to give a parameter to force delegate to abort 
 | |when "recipient seems to be dead", or is it a bug? And how can I avoid it in the
 | |future?

Suppression or restriction to the feature can be controlled in
several ways, by percentage of finished download, maximum size,
timeout, and so on.  I made a trial patch as enclosed.  With the
patch, you will be able to suppress the feature like
TIMEOUT="takeover:1".

Cheers,
Yutaka
--
Yutaka Sato <ysato@etl.go.jp> http://www.etl.go.jp/~ysato/   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_


diff -c ../../delegate5.9.1/src/http.c ./http.c
*** ../../delegate5.9.1/src/http.c	Fri Mar 12 14:44:17 1999
--- ./http.c	Fri Apr  2 18:04:27 1999
***************
*** 30,35 ****
--- 30,37 ----
  int HTTP_CKA_TIMEOUT_MARGIN = 2;
  int HTTP_CKA_MAXREQ         = 10;
  
+ extern int CACHE_TAKEOVER;
+ 
  extern int MAX_BUFF_SOCKRECV;
  extern int MAX_BUFF_SOCKSEND;
  extern int RES_CACHE_DISABLE;
***************
*** 2072,2077 ****
--- 2074,2086 ----
  	    if( ClientEOF && cachefp == NULL ){
   sv1log("## stop relay-1: no recipient & no cache\n");
  		break;
+ 	    }
+ 	    if( ClientEOF && cachefp != NULL && CACHE_TAKEOVER ){
+ 		if( CACHE_TAKEOVER < time(0) - Start ){
+ 			sv1log("CACHE_TAKEOVER: TIMEOUT=takeover:%d\n",
+ 				time(0)-(int)Start);
+ 			break;
+ 		}
  	    }
  
  	    if( 10 < ninput )
diff -c ../../delegate5.9.1/src/service.c ./service.c
*** ../../delegate5.9.1/src/service.c	Mon Mar 15 16:23:15 1999
--- ./service.c	Fri Apr  2 13:50:26 1999
***************
*** 1954,1959 ****
--- 1954,1960 ----
  extern int HTTP_CKA_TIMEOUT;
  extern int HTTP_CKA_TIMEOUT_MARGIN;
  extern double IDENT_TIMEOUT;
+ int CACHE_TAKEOVER;
  
  extern double Scan_period();
  static timeout1(to)
***************
*** 1976,1981 ****
--- 1977,1983 ----
  		if( streq(name,"restart"))   SERVER_RESTART = secs; else
  		if( streq(name,"daemon"))    SERVER_TIMEOUT = secs; else
  		if( streq(name,"standby")  ) STANDBY_TIMEOUT = secs; else
+ 		if( streq(name,"takeover"))  CACHE_TAKEOVER = secs; else
  		if( streq(name,"ftpcc"))     CC_TIMEOUT_FTP = secs; else
  		if( streq(name,"nntpcc"))    CC_TIMEOUT_NNTP = secs; else
  		if( streq(name,"http-cka"))  HTTP_CKA_TIMEOUT = secs; else

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V