You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2021/03/04 17:51:44 UTC
[lucene-solr] branch jira/solr-15210 updated: SOLR-15210: Minor
cleanups.
This is an automated email from the ASF dual-hosted git repository.
ab pushed a commit to branch jira/solr-15210
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/jira/solr-15210 by this push:
new 8ee4264 SOLR-15210: Minor cleanups.
8ee4264 is described below
commit 8ee4264950c24b3bdc839fcc355854fdbcd47056
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Thu Mar 4 18:51:16 2021 +0100
SOLR-15210: Minor cleanups.
---
.../src/java/org/apache/solr/handler/export/ExportWriter.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/handler/export/ExportWriter.java b/solr/core/src/java/org/apache/solr/handler/export/ExportWriter.java
index df03b40..9622677 100644
--- a/solr/core/src/java/org/apache/solr/handler/export/ExportWriter.java
+++ b/solr/core/src/java/org/apache/solr/handler/export/ExportWriter.java
@@ -483,6 +483,7 @@ public class ExportWriter implements SolrCore.RawWriter, Closeable {
}
// this inits only those sets that are not already present in the global cache
+ // which were populated for these segments in previous runs
private void initTempPartitionCaches(List<LeafReaderContext> leaves) {
tempPartitionCaches.clear();
for (LeafReaderContext leaf : leaves) {
@@ -491,7 +492,7 @@ public class ExportWriter implements SolrCore.RawWriter, Closeable {
continue;
}
IndexReader.CacheKey cacheKey = cacheHelper.getKey();
- // check if bitset was computed earlier and can be skipped
+ // check if a bitset was computed earlier for this segment and this query and can be skipped
SolrCache<String, FixedBitSet> perSegmentCache = partitionCaches.get(cacheKey);
if (perSegmentCache != null && perSegmentCache.get(partitionCacheKey) != null) {
// already computed earlier
@@ -525,6 +526,7 @@ public class ExportWriter implements SolrCore.RawWriter, Closeable {
}
}
+ // not sure about this class - it reduces object allocation but has linear cost of get()
private static final class DoubleArrayMapWriter implements MapWriter, EntryWriter {
final CharSequence[] keys;
final Object[] values;
@@ -572,7 +574,7 @@ public class ExportWriter implements SolrCore.RawWriter, Closeable {
// we materialize this document so that we can potentially do hash partitioning
private DoubleArrayMapWriter outputDoc;
- // WARNING: single-thread only! shared var tempDoc
+ // WARNING: single-thread only! shared var outputDoc
MapWriter fillOutputDoc(SortDoc sortDoc,
List<LeafReaderContext> leaves,
FieldWriter[] writers) throws IOException {
@@ -617,7 +619,7 @@ public class ExportWriter implements SolrCore.RawWriter, Closeable {
}
return doc;
} else {
- // XXX update the cache
+ // not our partition - skip it
return null;
}
}