lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Bon <v-al...@expedia.com>
Subject Solr "replicateAfter optimize" is specified, but replication starts also on commits and master startup (tested on solr 5.5.2)
Date Fri, 22 Jul 2016 10:02:37 GMT
Hi everyone,
I am experiencing a replication issue on a master/slave configuration,

Issue: Full index replicas occur sometimes on master startup and after commits, despite only
the <str name="replicateAfter">optimize</str> directive is specified. In the case
of replica on commit, it occurs only for sufficiently big commits. Replica correctly starts
again at the end of my indexing job, after the optimization phase. As result of this behaviour
I get incomplete indexes on slaves during the indexing process.
Solr version: 5.5.2
Configuration:

<config>
    <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>

    <luceneMatchVersion>5.5.1</luceneMatchVersion>

    <dataDir>${solr.data.dir:}</dataDir>

    <directoryFactory name="DirectoryFactory"
                      class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>

    <indexConfig>
        <writeLockTimeout>1000</writeLockTimeout>
        <useCompoundFile>false</useCompoundFile>
        <ramBufferSizeMB>32</ramBufferSizeMB>
        <mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
           <int name="maxMergeAtOnce">10</int>
           <int name="segmentsPerTier">10</int>
        </mergePolicyFactory>
        <lockType>native</lockType>
        <reopenReaders>true</reopenReaders>
        <deletionPolicy class="solr.SolrDeletionPolicy">
            <str name="maxCommitsToKeep">1</str>
            <str name="maxOptimizedCommitsToKeep">0</str>
        </deletionPolicy>
        <maxFieldLength>100000</maxFieldLength>
        <infoStream file="INFOSTREAM.txt">false</infoStream>
    </indexConfig>

    <jmx />

    <updateHandler class="solr.DirectUpdateHandler2">
        <autoCommit>
            <maxDocs>10000</maxDocs> <!-- maximum uncommited docs before autocommit
triggered -->
            <maxTime>600000</maxTime> <!-- maximum time (in MS) after adding
a doc before an autocommit is triggered -->
            <openSearcher>false</openSearcher>
        </autoCommit>
    </updateHandler>

    [...]

    <!--Replication from the Solr Master to the Slaves. The Job SrsIndexUpdateJob will
create the index on the master which will be replicated on the slaves.-->
    <requestHandler name="/replication" class="solr.ReplicationHandler">
        <lst name="master">
            <str name="enable">${solr.master.enable:false}</str>
            <str name="replicateAfter">optimize</str>
            <str name="backupAfter">optimize</str>
        </lst>
        <str name="maxNumberOfBackups">${solr.numberOfVersionToKeep:3}</str>
        <lst name="slave">
            <str name="enable">${solr.slave.enable:false}</str>
            <str name="masterUrl">${solr.master.url:}/replication</str>
            <str name="pollInterval">${solr.replication.pollInterval:00:00:30}</str>
        </lst>
    </requestHandler>

    [...]

    </config>


Any idea on how to solve this issue would be greatly appreciated.

Many thanks,
Alessandro

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