Skip to content

Apache Lucene open-source search software

SOLR-10004: Adding descriptions for a few classes to assess impact on smoke tester warnings

Ishan Chattopadhyaya6d80320aef9b
diff --git a/solr/core/src/java/org/apache/solr/update/PeerSync.java b/solr/core/src/java/org/apache/solr/update/PeerSync.java
index dfadb0cafdb..c6bfbbf1d05 100644
--- a/solr/core/src/java/org/apache/solr/update/PeerSync.java
+++ b/solr/core/src/java/org/apache/solr/update/PeerSync.java
@@ -65,7 +65,11 @@ import static org.apache.solr.common.params.CommonParams.ID;
import static org.apache.solr.update.processor.DistributedUpdateProcessor.DistribPhase.FROMLEADER;
import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM;
-/** @lucene.experimental */
+/**
+ * @lucene.experimental
+ * This class is useful for performing peer to peer synchronization of recently indexed update commands during
+ * recovery process.
+ */
public class PeerSync implements SolrMetricProducer {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private boolean debug = log.isDebugEnabled();
diff --git a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
index dac40001160..5772b2ef52c 100644
--- a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
+++ b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
@@ -51,7 +51,9 @@ import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
-
+/**
+ * Used for distributing commands from a shard leader to its replicas.
+ */
public class SolrCmdDistributor implements Closeable {
private static final int MAX_RETRIES_ON_FORWARD = 25;
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateLog.java b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
index 87b93f4a517..4928aa169d8 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateLog.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
@@ -80,7 +80,11 @@ import static org.apache.solr.update.processor.DistributedUpdateProcessor.Distri
import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM;
-/** @lucene.experimental */
+/**
+ * @lucene.experimental
+ * This holds references to the transaction logs and pointers for the document IDs to their
+ * exact positions in the transaction logs.
+ */
public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
private static final long STATUS_TIME = TimeUnit.NANOSECONDS.convert(60, TimeUnit.SECONDS);
public static String LOG_FILENAME_PATTERN = "%s.%019d";
@@ -143,7 +147,7 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
/**
* The index of the _version_ value in an entry from the transaction log.
*/
-public static final int VERSION_IDX = 1;
+ public static final int VERSION_IDX = 1;
/**
* The index of the previous pointer in an entry from the transaction log.
@@ -204,6 +208,9 @@ public static final int VERSION_IDX = 1;
}
};
+ /**
+ * Holds the query and the version for a DeleteByQuery command
+ */
public static class DBQ {
public String q; // the query string
public long version; // positive version of the DBQ