From 830228602df1da2ba5c7e4c2688434108414e221 Mon Sep 17 00:00:00 2001 From: Noble Paul Date: Mon, 25 Jul 2016 12:10:49 +0530 Subject: [PATCH] SOLR-9310: The variable name is confusing. maxInHash is not a hash --- .../org/apache/solr/update/IndexFingerprint.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/update/IndexFingerprint.java b/solr/core/src/java/org/apache/solr/update/IndexFingerprint.java index 01cf9a644e4..349b703d743 100644 --- a/solr/core/src/java/org/apache/solr/update/IndexFingerprint.java +++ b/solr/core/src/java/org/apache/solr/update/IndexFingerprint.java @@ -42,7 +42,7 @@ public class IndexFingerprint { private long maxVersionSpecified; private long maxVersionEncountered; - private long maxInHash; + private long maxVersionsUsedInHash; private long versionsHash; private long numVersions; private long numDocs; @@ -56,8 +56,8 @@ public class IndexFingerprint { return maxVersionEncountered; } - public long getMaxInHash() { - return maxInHash; + public long getMaxVersionsUsedInHash() { + return maxVersionsUsedInHash; } public long getVersionsHash() { @@ -113,7 +113,7 @@ public class IndexFingerprint { long v = fv.longVal(doc); f.maxVersionEncountered = Math.max(v, f.maxVersionEncountered); if (v <= f.maxVersionSpecified) { - f.maxInHash = Math.max(v, f.maxInHash); + f.maxVersionsUsedInHash = Math.max(v, f.maxVersionsUsedInHash); f.versionsHash += Hash.fmix64(v); f.numVersions++; } @@ -139,7 +139,7 @@ public class IndexFingerprint { } // Go by the highest version under the requested max. - cmp = Long.compare(f1.maxInHash, f2.maxInHash); + cmp = Long.compare(f1.maxVersionsUsedInHash, f2.maxVersionsUsedInHash); if (cmp != 0) return cmp; // go by who has the most documents in the index @@ -158,7 +158,7 @@ public class IndexFingerprint { Map map = new LinkedHashMap<>(); map.put("maxVersionSpecified", maxVersionSpecified); map.put("maxVersionEncountered", maxVersionEncountered); - map.put("maxInHash", maxInHash); + map.put("maxVersionsUsedInHash", maxVersionsUsedInHash); map.put("versionsHash", versionsHash); map.put("numVersions", numVersions); map.put("numDocs", numDocs); @@ -186,7 +186,7 @@ public class IndexFingerprint { IndexFingerprint f = new IndexFingerprint(); f.maxVersionSpecified = getLong(o, "maxVersionSpecified", Long.MAX_VALUE); f.maxVersionEncountered = getLong(o, "maxVersionEncountered", -1); - f.maxInHash = getLong(o, "maxInHash", -1); + f.maxVersionsUsedInHash = getLong(o, "maxVersionsUsedInHash", -1); f.versionsHash = getLong(o, "versionsHash", -1); f.numVersions = getLong(o, "numVersions", -1); f.numDocs = getLong(o, "numDocs", -1);