[jira] [Commented] (SOLR-12220) TestReplicationHandle.doTestStressReplication() fails on Windows because an index directory can't be deleted

2018-04-12 Thread Dawid Weiss (JIRA)

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

Dawid Weiss commented on SOLR-12220:


The fact a folder cannot be deleted is typically a signal of a deeper problem 
though? Like here:

bq. Unable to delete file: 
C:\Users\jenkins\workspace\Lucene-Solr-7.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandler_A86A8FEB7F34064-001\solr-instance-028\collection1\data\index.20180408092515440\_0_Lucene50_0.tim

Looks like those files are still locked by this or another process (locked as 
in: open handles). Could be external to the test (Windows search, defender, 
something else) too. I once toyed with the idea of tracking file handle opening 
so that stack traces from unclosed channels/ files would be shown, but never 
had the time to do it.

> TestReplicationHandle.doTestStressReplication() fails on Windows because an 
> index directory can't be deleted
> 
>
> Key: SOLR-12220
> URL: https://issues.apache.org/jira/browse/SOLR-12220
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Steve Rowe
>Priority: Major
> Attachments: thetaphi.Lucene.Solr.7.x.Windows.533.log.txt.gz
>
>
> Several recent Jenkins failures, e.g. 
> [https://jenkins.thetaphi.de/job/Lucene-Solr-7.x-Windows/533/]:
> {noformat}
>[junit4]   2> 1820871 ERROR (qtp574829981-16047) [x:collection1] 
> o.a.s.c.CachingDirectoryFactory Error removing directory 
> C:\Users\jenkins\workspace\Lucene-Solr-7.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandler_A86A8FEB7F34064-001\solr-instance-028\collection1\data\index.20180408092515440
>  before 
> core close:java.io.IOException: Unable to delete file: 
> C:\Users\jenkins\workspace\Lucene-Solr-7.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandler_A86A8FEB7F34064-001\solr-instance-028\collection1\data\index.20180408092515440\_0_Lucene50_0.tim
>[junit4]   2>at 
> org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2381)
>[junit4]   2>at 
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1679)
>[junit4]   2>at 
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1575)
>[junit4]   2>at 
> org.apache.solr.core.StandardDirectoryFactory.removeDirectory(StandardDirectoryFactory.java:108)
>[junit4]   2>at 
> org.apache.solr.core.CachingDirectoryFactory.closeCacheValue(CachingDirectoryFactory.java:274)
>[junit4]   2>at 
> org.apache.solr.core.CachingDirectoryFactory.release(CachingDirectoryFactory.java:437)
>[junit4]   2>at 
> org.apache.solr.search.SolrIndexSearcher.close(SolrIndexSearcher.java:496)
>[junit4]   2>at 
> org.apache.solr.core.SolrCore$2.close(SolrCore.java:2402)
>[junit4]   2>at 
> org.apache.solr.util.RefCounted.decref(RefCounted.java:56)
>[junit4]   2>at 
> org.apache.solr.request.SolrQueryRequestBase.close(SolrQueryRequestBase.java:154)
>[junit4]   2>at 
> org.apache.solr.servlet.HttpSolrCall.destroy(HttpSolrCall.java:566)
>[junit4]   2>at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:411)
>[junit4]   2>at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:339)
>[junit4]   2>at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
>[junit4]   2>at 
> org.apache.solr.client.solrj.embedded.JettySolrRunner$DebugFilter.doFilter(JettySolrRunner.java:139)
>[junit4]   2>at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
>[junit4]   2>at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
>[junit4]   2>at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
>[junit4]   2>at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
>[junit4]   2>at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
>[junit4]   2>at 
> org.eclipse.je

[jira] [Commented] (SOLR-12220) TestReplicationHandle.doTestStressReplication() fails on Windows because an index directory can't be deleted

2018-04-12 Thread Steve Rowe (JIRA)

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

Steve Rowe commented on SOLR-12220:
---

Maybe we could ignore the non-deleteable directory on Windows?

> TestReplicationHandle.doTestStressReplication() fails on Windows because an 
> index directory can't be deleted
> 
>
> Key: SOLR-12220
> URL: https://issues.apache.org/jira/browse/SOLR-12220
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Steve Rowe
>Priority: Major
> Attachments: thetaphi.Lucene.Solr.7.x.Windows.533.log.txt.gz
>
>
> Several recent Jenkins failures, e.g. 
> [https://jenkins.thetaphi.de/job/Lucene-Solr-7.x-Windows/533/]:
> {noformat}
>[junit4]   2> 1820871 ERROR (qtp574829981-16047) [x:collection1] 
> o.a.s.c.CachingDirectoryFactory Error removing directory 
> C:\Users\jenkins\workspace\Lucene-Solr-7.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandler_A86A8FEB7F34064-001\solr-instance-028\collection1\data\index.20180408092515440
>  before 
> core close:java.io.IOException: Unable to delete file: 
> C:\Users\jenkins\workspace\Lucene-Solr-7.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandler_A86A8FEB7F34064-001\solr-instance-028\collection1\data\index.20180408092515440\_0_Lucene50_0.tim
>[junit4]   2>at 
> org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2381)
>[junit4]   2>at 
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1679)
>[junit4]   2>at 
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1575)
>[junit4]   2>at 
> org.apache.solr.core.StandardDirectoryFactory.removeDirectory(StandardDirectoryFactory.java:108)
>[junit4]   2>at 
> org.apache.solr.core.CachingDirectoryFactory.closeCacheValue(CachingDirectoryFactory.java:274)
>[junit4]   2>at 
> org.apache.solr.core.CachingDirectoryFactory.release(CachingDirectoryFactory.java:437)
>[junit4]   2>at 
> org.apache.solr.search.SolrIndexSearcher.close(SolrIndexSearcher.java:496)
>[junit4]   2>at 
> org.apache.solr.core.SolrCore$2.close(SolrCore.java:2402)
>[junit4]   2>at 
> org.apache.solr.util.RefCounted.decref(RefCounted.java:56)
>[junit4]   2>at 
> org.apache.solr.request.SolrQueryRequestBase.close(SolrQueryRequestBase.java:154)
>[junit4]   2>at 
> org.apache.solr.servlet.HttpSolrCall.destroy(HttpSolrCall.java:566)
>[junit4]   2>at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:411)
>[junit4]   2>at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:339)
>[junit4]   2>at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
>[junit4]   2>at 
> org.apache.solr.client.solrj.embedded.JettySolrRunner$DebugFilter.doFilter(JettySolrRunner.java:139)
>[junit4]   2>at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
>[junit4]   2>at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
>[junit4]   2>at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
>[junit4]   2>at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
>[junit4]   2>at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:527)
>[junit4]   2>at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
>[junit4]   2>at 
> org.eclipse.jetty.server.Server.handle(Server.java:530)
>[junit4]   2>