You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2024/09/02 19:53:00 UTC

(solr) branch main updated: Comment: SolrCore.getRealtimeSearcher (#2610)

This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 18ec785e558 Comment: SolrCore.getRealtimeSearcher (#2610)
18ec785e558 is described below

commit 18ec785e558d3083e0af738a7c57de9d3e6a85b9
Author: David Smiley <ds...@apache.org>
AuthorDate: Mon Sep 2 15:52:54 2024 -0400

    Comment: SolrCore.getRealtimeSearcher (#2610)
---
 solr/core/src/java/org/apache/solr/core/SolrCore.java | 2 ++
 1 file changed, 2 insertions(+)

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 4c3d09980ca..354f5465ca3 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java
@@ -2228,6 +2228,8 @@ public class SolrCore implements SolrInfoBean, Closeable {
    * reference count will be incremented.
    */
   public RefCounted<SolrIndexSearcher> getRealtimeSearcher() {
+    // In practice, this is nearly always the same as the non-realtime searcher because that one
+    //   nearly always exists and it installs itself as the realtime searcher.
     synchronized (searcherLock) {
       if (realtimeSearcher != null) {
         realtimeSearcher.incref();