From b0177312032e039673bfbbd42cd1dca09fb93833 Mon Sep 17 00:00:00 2001 From: Ishan Chattopadhyaya Date: Mon, 9 Jan 2017 08:33:06 +0530 Subject: [PATCH] SOLR-9777: IndexFingerprinting should use getCombinedCoreAndDeletesKey() instead of getCoreCacheKey() for per-segment caching --- solr/CHANGES.txt | 2 ++ solr/core/src/java/org/apache/solr/core/SolrCore.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 11151d7ff1f..49d24df19c1 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -406,6 +406,8 @@ Other Changes * SOLR-9944: Map the nodes function name to the GatherNodesStream (Joel Bernstein) +* SOLR-9777: IndexFingerprinting should use getCombinedCoreAndDeletesKey() instead of getCoreCacheKey() for per-segment caching (Ishan Chattopadhyaya) + ================== 6.3.0 ================== Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release. diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java index 08072e158f9..697e008c81e 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrCore.java +++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java @@ -1687,7 +1687,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable { public IndexFingerprint getIndexFingerprint(SolrIndexSearcher searcher, LeafReaderContext ctx, long maxVersion) throws IOException { IndexFingerprint f = null; - f = perSegmentFingerprintCache.get(ctx.reader().getCoreCacheKey()); + f = perSegmentFingerprintCache.get(ctx.reader().getCombinedCoreAndDeletesKey()); // fingerprint is either not cached or // if we want fingerprint only up to a version less than maxVersionEncountered in the segment, or // documents were deleted from segment for which fingerprint was cached @@ -1698,7 +1698,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable { // cache fingerprint for the segment only if all the versions in the segment are included in the fingerprint if (f.getMaxVersionEncountered() == f.getMaxInHash()) { log.info("Caching fingerprint for searcher:{} leafReaderContext:{} mavVersion:{}", searcher, ctx, maxVersion); - perSegmentFingerprintCache.put(ctx.reader().getCoreCacheKey(), f); + perSegmentFingerprintCache.put(ctx.reader().getCombinedCoreAndDeletesKey(), f); } } else {