archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maria Odea Ching" <och...@apache.org>
Subject Re: svn commit: r610758 - /maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
Date Fri, 11 Jan 2008 09:44:41 GMT
Okey dokey, thanks Nico!

-Deng

On Jan 11, 2008 5:12 PM, nicolas de loof <nicolas@apache.org> 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 <oching@apache.org>:
> >
> > 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, <nicolas@apache.org> 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 )
> > >
> > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message