[ 
https://issues.apache.org/jira/browse/IVY-1572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16312720#comment-16312720
 ] 

Aurelien Pupier commented on IVY-1572:
--------------------------------------

{quote}In the upcoming Ivy release, timeout-constraints have been introduced on 
repositories to solve the connection and read timeout issues like these. More 
about this feature can be found here 
http://ant.apache.org/ivy/history/master/settings/timeout-constraints.html{quote}

it is a great feature.
i think that both are complementary. The "timeout-constraints" for advanced 
users and when a repository has been detected as slow/unavailable and this one 
to allow normal users just cancel when it takes too much time without requiring 
any configurations.


> Look for Thread interruption on potentially long-running operation 
> org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatterns(ModuleRevisionId,
>  List, Artifact, ResourceMDParser, Date)
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-1572
>                 URL: https://issues.apache.org/jira/browse/IVY-1572
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.4.0
>            Reporter: Aurelien Pupier
>
> While searching for an unavailable artifact and a lot of repositories are 
> defined (and especially when some of them are not very responsive), the 
> search can take several minutes.
> For this reason, it would be nice to be able to look for interruption during 
> a search.
> example of stack
> {noformat}
> Thread [Camel Version Checker - 
> org.fusesource.ide.projecttemplates.util.CamelVersionChecker@576f3c03] 
> (Suspended)    
>       owns: BufferedInputStream  (id=195)     
>       owns: CamelVersionChecker  (id=196)     
>       SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) 
> line: not available [native method]        
>       SocketInputStream.socketRead(FileDescriptor, byte[], int, int, int) 
> line: 116   
>       SocketInputStream.read(byte[], int, int, int) line: 170 
>       SocketInputStream.read(byte[], int, int) line: 141      
>       BufferedInputStream.fill() line: 246    
>       BufferedInputStream.read() line: 265    
>       HttpParser.readRawLine(InputStream) line: 78    
>       HttpParser.readLine(InputStream, String) line: 106      
>       
> MultiThreadedHttpConnectionManager$HttpConnectionWithReference(HttpConnection).readLine(String)
>  line: 1116      
>       
> MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(String) 
> line: 1413    
>       HeadMethod(HttpMethodBase).readStatusLine(HttpState, HttpConnection) 
> line: 1973 
>       HeadMethod(HttpMethodBase).readResponse(HttpState, HttpConnection) 
> line: 1735   
>       HeadMethod(HttpMethodBase).execute(HttpState, HttpConnection) line: 
> 1098        
>       HttpMethodDirector.executeWithRetry(HttpMethod) line: 398       
>       HttpMethodDirector.executeMethod(HttpMethod) line: 171  
>       HttpClient.executeMethod(HostConfiguration, HttpMethod, HttpState) 
> line: 397    
>       HttpClient.executeMethod(HttpMethod) line: 323  
>       TimeoutHttpClientHandler(HttpClientHandler).doHead(URL, int) line: 266  
>       TimeoutHttpClientHandler(HttpClientHandler).getURLInfo(URL, int) line: 
> 152      
>       TimeoutHttpClientHandler.getURLInfo(URL) line: 55       
>       URLResource.init() line: 68     
>       URLResource.exists() line: 84   
>       
> IBiblioResolver(RepositoryResolver).findResourceUsingPattern(ModuleRevisionId,
>  String, Artifact, ResourceMDParser, Date) line: 97       
>       
> IBiblioResolver(AbstractPatternsBasedResolver).findResourceUsingPatterns(ModuleRevisionId,
>  List, Artifact, ResourceMDParser, Date) line: 100    
>       IBiblioResolver.findIvyFileRef(DependencyDescriptor, ResolveData) line: 
> 103     
>       IBiblioResolver(BasicResolver).getDependency(DependencyDescriptor, 
> ResolveData) line: 230       
>       IBiblioResolver.getDependency(DependencyDescriptor, ResolveData) line: 
> 506      
>       ChainResolver.getDependency(DependencyDescriptor, ResolveData) line: 
> 104        
>       IvyNode.loadData(String, IvyNode, String, String, boolean, 
> IvyNodeUsage) line: 170      
>       VisitNode.loadData(String, boolean) line: 292   
>       ResolveEngine.fetchDependencies(VisitNode, String, boolean) line: 718   
>       ResolveEngine.doFetchDependencies(VisitNode, String) line: 803  
>       ResolveEngine.fetchDependencies(VisitNode, String, boolean) line: 726   
>       ResolveEngine.getDependencies(ModuleDescriptor, ResolveOptions, 
> ResolveReport) line: 599        
>       ResolveEngine.resolve(ModuleDescriptor, ResolveOptions) line: 236       
>       Ivy.resolve(ModuleDescriptor, ResolveOptions) line: 523 
>       Ivy$resolve$0.call(Object, Object, Object) line: not available  
>       GrapeIvy.getDependencies(Map, IvyGrabRecord...) line: 410       
>       NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not 
> available [native method]  
>       NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62      
>       DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43  
>       Method.invoke(Object, Object...) line: 498      
>       PogoMetaMethodSite$PogoCachedMethodSite.invoke(Object, Object[]) line: 
> 169      
>       
> PogoMetaMethodSite$PogoCachedMethodSite(PogoMetaMethodSite).callCurrent(GroovyObject,
>  Object[]) line: 59        
>       GrapeIvy.resolve(ClassLoader, Map, List, Map...) line: 571      
>       GrapeIvy$resolve$1.callCurrent(GroovyObject, Object, Object, Object, 
> Object) line: not available        
>       GrapeIvy.resolve(ClassLoader, Map, Map...) line: 538    
>       GrapeIvy$resolve$0.callCurrent(GroovyObject, Object, Object, Object) 
> line: not available        
>       GrapeIvy.grab(Map, Map...) line: 256    
>       NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not 
> available [native method]  
>       NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62      
>       DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43  
>       Method.invoke(Object, Object...) line: 498      
>       PogoMetaMethodSite$PogoCachedMethodSite.invoke(Object, Object[]) line: 
> 169      
>       
> PogoMetaMethodSite$PogoCachedMethodSite(PogoMetaMethodSite).callCurrent(GroovyObject,
>  Object[]) line: 59        
>       
> PogoMetaMethodSite$PogoCachedMethodSite(AbstractCallSite).callCurrent(GroovyObject,
>  Object, Object) line: 174   
>       GrapeIvy.grab(Map) line: 237    
>       Grape.grab(Map<String,Object>) line: 152        
>       MavenVersionManager.loadVersion(String) line: 109       
>       CamelService.isCamelVersionExisting(String) line: 326   
>       CamelManagerServiceProxy.isCamelVersionExisting(String) line: 171       
>       CamelVersionChecker.isCamelVersionValid(String) line: 79        
>       CamelVersionChecker.lambda$0() line: 60 
>       1017131809.run() line: not available    
>       Thread.run() line: 745  
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to