Skip to content

Commit

Permalink
Comment: SolrCore.getRealtimeSearcher (#2610)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmiley authored Sep 2, 2024
1 parent 26d00c3 commit 18ec785
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions solr/core/src/java/org/apache/solr/core/SolrCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -2228,6 +2228,8 @@ public RefCounted<SolrIndexSearcher> getNewestSearcher(boolean openNew) {
* 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();
Expand Down

0 comments on commit 18ec785

Please sign in to comment.