Thanks for the info.
I understand that the latest "replicateable" version of index may
differ from the actual version of index on master/slave.
But why when I use
/solr/replication?command=indexversion

On master:

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
</lst>
<long name="indexversion">1363263304585</long>
<long name="generation">4</long>
</response>

And on slave:

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">1</int>
</lst>
<long name="indexversion">1363263600323</long>
<long name="generation">5</long>
</response>

Why do I get higher version on slave than on master?

The page https://wiki.apache.org/solr/SolrReplication states:
"Get the latest replicateable index on master:
http://master_host:port/solr/replication?command=indexversion"; -> ok,
returns latest replicatable index version
"Get version number of the index:
http://host:port/solr/replication?command=indexversion"; -> for me it
means that on slave I should get actual index version and not an index
version appropriate for replication (it is a slave, it should not be
the source of replication)
Yes, it is confusing overall :)

My question is: how to get actual index version on master and slave
for monitoring purpose? I can use: /solr/replication?command=details

On master:

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">1</int>
</lst>
<lst name="details">
<str name="indexSize">22.59 KB</str>
<str name="indexPath">/usr/share/solr/data/index/</str>
<arr name="commits">
<lst>
<long name="indexVersion">1363263304585</long>
<long name="generation">4</long>
<arr name="filelist">
<str>_2_Lucene41_0.pos</str>
<str>_2.si</str>
<str>_2_Lucene41_0.tim</str>
<str>_2.fdt</str>
<str>_2_Lucene41_0.doc</str>
<str>_2_Lucene41_0.tip</str>
<str>_2.fdx</str>
<str>_2.tvx</str>
<str>_2.fnm</str>
<str>_2_nrm.cfe</str>
<str>_2.tvd</str>
<str>_2_Lucene41_0.pay</str>
<str>_2_nrm.cfs</str>
<str>_2.tvf</str>
<str>segments_4</str>
</arr>
</lst>
</arr>
<str name="isMaster">true</str>
<str name="isSlave">false</str>
<long name="indexVersion">1363263304585</long>
<long name="generation">4</long>
<lst name="master">
<str name="confFiles">schema.xml,stopwords.txt</str>
<arr name="replicateAfter">
<str>commit</str>
<str>startup</str>
</arr>
<str name="replicationEnabled">true</str>
<long name="replicatableGeneration">4</long>
</lst>
</lst>
<str name="WARNING">
This response format is experimental. It is likely to change in the future.
</str>
</response>

On slave:

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">25</int>
</lst>
<lst name="details">
<str name="indexSize">22.59 KB</str>
<str name="indexPath">/usr/share/solr/data/index/</str>
<arr name="commits">
<lst>
<long name="indexVersion">1363263600323</long>
<long name="generation">5</long>
<arr name="filelist">
<str>_2_Lucene41_0.pos</str>
<str>_2.si</str>
<str>_2_Lucene41_0.tim</str>
<str>_2.fdt</str>
<str>_2_Lucene41_0.doc</str>
<str>_2_Lucene41_0.tip</str>
<str>_2.fdx</str>
<str>_2.tvx</str>
<str>_2.fnm</str>
<str>_2_nrm.cfe</str>
<str>_2.tvd</str>
<str>_2_Lucene41_0.pay</str>
<str>_2_nrm.cfs</str>
<str>segments_5</str>
<str>_2.tvf</str>
</arr>
</lst>
</arr>
<str name="isMaster">false</str>
<str name="isSlave">true</str>
<long name="indexVersion">1363263304585</long>
<long name="generation">4</long>
<lst name="slave">
<lst name="masterDetails">
<str name="indexSize">22.59 KB</str>
<str name="indexPath">/usr/share/solr/data/index/</str>
<arr name="commits">
<lst>
<long name="indexVersion">1363263304585</long>
<long name="generation">4</long>
<arr name="filelist">
<str>_2_Lucene41_0.pos</str>
<str>_2.si</str>
<str>_2_Lucene41_0.tim</str>
<str>_2.fdt</str>
<str>_2_Lucene41_0.doc</str>
<str>_2_Lucene41_0.tip</str>
<str>_2.fdx</str>
<str>_2.tvx</str>
<str>_2.fnm</str>
<str>_2_nrm.cfe</str>
<str>_2.tvd</str>
<str>_2_Lucene41_0.pay</str>
<str>_2_nrm.cfs</str>
<str>_2.tvf</str>
<str>segments_4</str>
</arr>
</lst>
</arr>
<str name="isMaster">true</str>
<str name="isSlave">false</str>
<long name="indexVersion">1363263304585</long>
<long name="generation">4</long>
<lst name="master">
<str name="confFiles">schema.xml,stopwords.txt</str>
<arr name="replicateAfter">
<str>commit</str>
<str>startup</str>
</arr>
<str name="replicationEnabled">true</str>
<long name="replicatableGeneration">4</long>
</lst>
</lst>
<str name="masterUrl">http://172.18.19.204:8080/solr</str>
<str name="pollInterval">00:00:60</str>
<str name="nextExecutionAt">Wed Mar 20 08:48:00 CET 2013</str>
<str name="indexReplicatedAt">Thu Mar 14 13:20:00 CET 2013</str>
<arr name="indexReplicatedAtList">
<str>Thu Mar 14 13:20:00 CET 2013</str>
<str>Thu Mar 14 13:19:00 CET 2013</str>
<str>Thu Mar 14 12:18:00 CET 2013</str>
<str>Thu Mar 14 12:17:00 CET 2013</str>
<str>Fri Mar 08 14:55:00 CET 2013</str>
<str>Fri Mar 08 14:50:52 CET 2013</str>
<str>Fri Mar 08 14:32:00 CET 2013</str>
</arr>
<str name="timesIndexReplicated">7</str>
<str name="lastCycleBytesDownloaded">23212</str>
<str name="previousCycleTimeInSeconds">0</str>
<str name="currentDate">Wed Mar 20 08:47:03 CET 2013</str>
<str name="isPollingDisabled">false</str>
<str name="isReplicating">false</str>
</lst>
</lst>
<str name="WARNING">
This response format is experimental. It is likely to change in the future.
</str>
</response>

Which line with "indexVersion" should I use?

Best regards,
Rafal Radecki.


2013/3/19 Mark Miller <markrmil...@gmail.com>:
>
> On Mar 15, 2013, at 6:43 AM, Rafał Radecki <radecki.ra...@gmail.com> wrote:
>
>> I use http and get /solr/replication?command=indexversion urls to get
>> index versions on master and slave. The replication works fine but
>> index versions from /solr/replication?command=indexversion differ.
>
> I think thats normal - it's a little misleading, but the replication index 
> version is that of the most recent 'replicatable' commit point. That is 
> determined by things like replicate on startup, replicate on commit, etc.
>
> These are very likely to be different from mater to slave.
>
> -  Mark

Reply via email to