SOLR-9777: IndexFingerprinting should use getCombinedCoreAndDeletesKey() instead of getCoreCacheKey() for per-segment caching

This commit is contained in:
Ishan Chattopadhyaya 2017-01-09 08:33:06 +05:30
parent 322ad88960
commit b017731203
2 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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 {