Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9859

replication.properties cannot be updated after being written and neither replication.properties or index.properties are durable in the face of a crash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.5.3, 6.3
    • 6.4, 7.0
    • None
    • None

    Description

      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

      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)
      

      Attachments

        1. SOLR-9859.patch
          9 kB
          Mark Miller
        2. SOLR-9859.patch
          8 kB
          Mark Miller
        3. SOLR-9859.patch
          8 kB
          Mark Miller
        4. SOLR-9859.patch
          7 kB
          Mark Miller
        5. SOLR-9859.patch
          7 kB
          Mark Miller
        6. SOLR-9859.patch
          1 kB
          Cao Manh Dat

        Issue Links

          Activity

            People

              markrmiller@gmail.com Mark Miller
              praste Pushkar Raste
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: