You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mark Miller (JIRA)" <ji...@apache.org> on 2016/12/14 18:13:58 UTC

[jira] [Commented] (SOLR-9859) replication.properties does not get updated the second time around if index recovers via replication

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

Mark Miller commented on SOLR-9859:
-----------------------------------

I may be seeing this in the tests as well, but we just WARN about it. Should review this code:

{noformat}
   [junit4]   2> 254570 WARN  (indexFetcher-1159-thread-1) [    x:collection1] o.a.s.h.IndexFetcher Exception while updating statistics
   [junit4]   2> java.io.IOException: file "replication.properties" was already written to
   [junit4]   2> 	at org.apache.lucene.store.MockDirectoryWrapper.createOutput(MockDirectoryWrapper.java:654)
   [junit4]   2> 	at org.apache.solr.handler.IndexFetcher.logReplicationTimeAndConfFiles(IndexFetcher.java:689)
   [junit4]   2> 	at org.apache.solr.handler.IndexFetcher.fetchLatestIndex(IndexFetcher.java:501)
   [junit4]   2> 	at org.apache.solr.handler.IndexFetcher.fetchLatestIndex(IndexFetcher.java:265)
   [junit4]   2> 	at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:397)
   [junit4]   2> 	at org.apache.solr.handler.ReplicationHandler.lambda$setupPolling$2(ReplicationHandler.java:1154)
   [junit4]   2> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   [junit4]   2> 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
   [junit4]   2> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
   [junit4]   2> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
   [junit4]   2> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   [junit4]   2> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   [junit4]   2> 	at java.lang.Thread.run(Thread.java:745)
{noformat}

> replication.properties does not get updated the second time around if index recovers via replication
> ----------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-9859
>                 URL: https://issues.apache.org/jira/browse/SOLR-9859
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 5.5.3, 6.3
>            Reporter: Pushkar Raste
>            Priority: Minor
>
> If a shard recovers via replication (vs PeerSync) a file named {{replication.properties}} gets created. If the same shard recovers once more via replication, IndexFetcher fails to write latest replication information as it tries to create {{replication.properties}} but as file already exists. Here is the stack trace I saw 
> {code}
> java.nio.file.FileAlreadyExistsException: <solr_home>\shard-3-001\cores\collection1\data\replication.properties
> 	at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
> 	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
> 	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
> 	at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
> 	at java.nio.file.spi.FileSystemProvider.newOutputStream(Unknown Source)
> 	at java.nio.file.Files.newOutputStream(Unknown Source)
> 	at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:413)
> 	at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:409)
> 	at org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:253)
> 	at org.apache.solr.handler.IndexFetcher.logReplicationTimeAndConfFiles(IndexFetcher.java:689)
> 	at org.apache.solr.handler.IndexFetcher.fetchLatestIndex(IndexFetcher.java:501)
> 	at org.apache.solr.handler.IndexFetcher.fetchLatestIndex(IndexFetcher.java:265)
> 	at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:397)
> 	at org.apache.solr.cloud.RecoveryStrategy.replicate(RecoveryStrategy.java:157)
> 	at org.apache.solr.cloud.RecoveryStrategy.doRecovery(RecoveryStrategy.java:409)
> 	at org.apache.solr.cloud.RecoveryStrategy.run(RecoveryStrategy.java:222)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> 	at java.util.concurrent.FutureTask.run(Unknown Source)
> 	at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$0(ExecutorUtil.java:229)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org