[ 
https://issues.apache.org/jira/browse/SOLR-6920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Varun Thacker updated SOLR-6920:
--------------------------------
    Attachment: SOLR-6920.patch

1. Changed the log message in {{SnapPuller.compareFile()}} since checksum won't 
be present in case of exception.
>From - {{LOG.warn("File {} did not match. expected checksum is {} and actual 
>is checksum {}. " + "expected length is {} and actual length is {}", filename, 
>backupIndexFileChecksum indexFileChecksum, backupIndexFileLen, indexFileLen);}}
To - {{LOG.warn("File {} did not match. expected length is {} and actual length 
is {}", filename,backupIndexFileLen, indexFileLen);}}

2. In {{SnapPuller.downloadIndexFiles}} made {{(String) file.get(NAME))}} into 
a variable for better readibility.

3. The if condition still needs tweaking? We could still have a non 
checksummed/checksum threw error .si/.liv/segments_n file and be equal in 
length and we wouldn't re-download?

Maybe the condition could be the check you initially proposed -
1. If file is a .si/.liv/segments_n file download regardless
2. else if  if (!compareResult.equal || downloadCompleteIndex) then re-download?

> During replication use checksums to verify if files are the same
> ----------------------------------------------------------------
>
>                 Key: SOLR-6920
>                 URL: https://issues.apache.org/jira/browse/SOLR-6920
>             Project: Solr
>          Issue Type: Bug
>          Components: replication (java)
>            Reporter: Varun Thacker
>            Assignee: Mark Miller
>            Priority: Critical
>         Attachments: SOLR-6920.patch, SOLR-6920.patch, SOLR-6920.patch, 
> SOLR-6920.patch, SOLR-6920.patch, SOLR-6920.patch
>
>
> Currently we check if an index file on the master and slave is the same by 
> checking if it's name and file length match. 
> With LUCENE-2446 we now have a checksums for each index file in the segment. 
> We should leverage this to verify if two files are the same.
> Places like SnapPuller.isIndexStale and SnapPuller.downloadIndexFiles should 
> check against the checksum also.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to