Return-Path: Delivered-To: apmail-maven-archiva-dev-archive@locus.apache.org Received: (qmail 24547 invoked from network); 11 Jan 2008 09:45:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jan 2008 09:45:12 -0000 Received: (qmail 53258 invoked by uid 500); 11 Jan 2008 09:45:01 -0000 Delivered-To: apmail-maven-archiva-dev-archive@maven.apache.org Received: (qmail 53212 invoked by uid 500); 11 Jan 2008 09:45:01 -0000 Mailing-List: contact archiva-dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: archiva-dev@maven.apache.org Delivered-To: mailing list archiva-dev@maven.apache.org Received: (qmail 53203 invoked by uid 99); 11 Jan 2008 09:45:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2008 01:45:01 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of oching@exist.com designates 64.233.162.228 as permitted sender) Received: from [64.233.162.228] (HELO nz-out-0506.google.com) (64.233.162.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2008 09:44:37 +0000 Received: by nz-out-0506.google.com with SMTP id x3so570473nzd.6 for ; Fri, 11 Jan 2008 01:44:41 -0800 (PST) Received: by 10.142.214.5 with SMTP id m5mr1501284wfg.151.1200044681278; Fri, 11 Jan 2008 01:44:41 -0800 (PST) Received: by 10.143.192.6 with HTTP; Fri, 11 Jan 2008 01:44:41 -0800 (PST) Message-ID: <1a57a2980801110144i6f13f19bvd2a185fb5ff62cd5@mail.gmail.com> Date: Fri, 11 Jan 2008 17:44:41 +0800 From: "Maria Odea Ching" Sender: oching@exist.com To: archiva-dev@maven.apache.org Subject: Re: svn commit: r610758 - /maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java In-Reply-To: <4c39e3030801110112u36e71731ud067fd6304d3b4d1@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_497_18525654.1200044681279" References: <20080110110038.C85DC1A983A@eris.apache.org> <1a57a2980801102335w9155400ke653a5a14090103f@mail.gmail.com> <4c39e3030801110112u36e71731ud067fd6304d3b4d1@mail.gmail.com> X-Google-Sender-Auth: af295cec4e4704e5 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_497_18525654.1200044681279 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Okey dokey, thanks Nico! -Deng On Jan 11, 2008 5:12 PM, nicolas de loof wrote: > I've reverted my change. > > The cacheUrlFailure is not set on an "one-instance-per-connector" basis > and > using it has for side effect to break the test expectation. > I missunderstood what it was designed for, and am not familiar enought > with > plexus to change the cacheFailure nature to a "prototype" (using Spring > vocabulary). > > Nico. > > > 2008/1/11, Maria Odea Ching : > > > > Hi Nicolas, > > > > I'm getting test failures in archiva-proxy after this change, > specifically > > in CacheFailuresTransferTest. > > Could you please update the test case to reflect these changes? :) > > > > Thanks, > > Deng > > > > > > On Jan 10, 2008 7:00 PM, wrote: > > > > > Author: nicolas > > > Date: Thu Jan 10 03:00:35 2008 > > > New Revision: 610758 > > > > > > URL: http://svn.apache.org/viewvc?rev=610758&view=rev > > > Log: > > > skip when URL is in failure cache > > > cache proxy failures (404) for better performances > > > > > > Modified: > > > > > > > > > maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java > > > > > > Modified: > > > > > > maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java > > > URL: > > > > > > http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java?rev=610758&r1=610757&r2=610758&view=diff > > > > > > > > > ============================================================================== > > > --- > > > > > > maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java > > > (original) > > > +++ > > > > > > maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java > > > Thu Jan 10 03:00:35 2008 > > > @@ -524,10 +524,15 @@ > > > getLogger().info( emsg ); > > > return null; > > > } > > > - > > > + > > > + if ( urlFailureCache.hasFailedBefore( url ) ) > > > + { > > > + throw new NotFoundException( "Url has failed > > > before and cache-failure is enabled on this connector" ); > > > + } > > > + > > > Wagon wagon = null; > > > try > > > - { > > > + { > > > RepositoryURL repoUrl = remoteRepository.getURL(); > > > String protocol = repoUrl.getProtocol(); > > > wagon = (Wagon) wagons.get( protocol ); > > > @@ -547,7 +552,10 @@ > > > } > > > catch ( NotFoundException e ) > > > { > > > - // Do not cache url here. > > > + // public repositories may be slow to access, > > and > > > many request will fail when > > > + // muliple repositories are "merged" by > archiva > > > via proxies. > > > + // so caching "not found" is usefull here to > > > enhance archiva response-time > > > + urlFailureCache.cacheFailure( url ); > > > throw e; > > > } > > > catch ( NotModifiedException e ) > > > > > > > > > > > > ------=_Part_497_18525654.1200044681279--