lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1658524 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/handler/SnapPuller.java
Date Mon, 09 Feb 2015 18:45:51 GMT
Author: markrmiller
Date: Mon Feb  9 18:45:51 2015
New Revision: 1658524

URL: http://svn.apache.org/r1658524
Log:
SOLR-6920, SOLR-6640: Make constant and fix logging.

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/SnapPuller.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/SnapPuller.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/SnapPuller.java?rev=1658524&r1=1658523&r2=1658524&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/SnapPuller.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/SnapPuller.java
Mon Feb  9 18:45:51 2015
@@ -124,6 +124,8 @@ import org.slf4j.LoggerFactory;
  * @since solr 1.4
  */
 public class SnapPuller {
+  private static final int _100K = 100000;
+
   public static final String INDEX_PROPERTIES = "index.properties";
 
   private static final Logger LOG = LoggerFactory.getLogger(SnapPuller.class.getName());
@@ -834,9 +836,9 @@ public class SnapPuller {
   private boolean filesToAlwaysDownloadIfNoChecksums(String filename,
       long size, CompareResult compareResult) {
     // without checksums to compare, we always download .si, .liv, segments_N,
-    // and any file under 100kb
+    // and any very small files
     return !compareResult.checkSummed && (filename.endsWith(".si") || filename.endsWith(".liv")
-    || filename.startsWith("segments_") || size < 100000);
+    || filename.startsWith("segments_") || size < _100K);
   }
 
   static class CompareResult {
@@ -868,9 +870,7 @@ public class SnapPuller {
             return compareResult;
           } else {
             LOG.warn(
-                "File {} did not match. "  + "expected length is {} and actual length is
{}",
-                filename, backupIndexFileChecksum, indexFileChecksum,
-                backupIndexFileLen, indexFileLen);
+                "File {} did not match. expected length is {} and actual length is {}", filename,
backupIndexFileLen, indexFileLen);
             compareResult.equal = false;
             return compareResult;
           }



Mime
View raw message