From 0b95a6e70f6361b9ca7dcbf34ef4ac982305b255 Mon Sep 17 00:00:00 2001 From: gbellaton <66298424+gbellaton@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:30:47 +0100 Subject: [PATCH] SOLR-17084: SolrJ: shorten error message; don't serialize all "zombies" (#2097) LBSolrClient (used by CloudSolrClient) now returns the count of core tracked as not live AKA zombies instead of the full list of cores. This list is potentially VERY long which was causing high CPU and memory usage. --- solr/CHANGES.txt | 3 ++- .../java/org/apache/solr/client/solrj/impl/LBSolrClient.java | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index be5eb556f9c..3e8de72b190 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -110,7 +110,8 @@ Improvements Optimizations --------------------- -(No changes) +* SOLR-17084: LBSolrClient (used by CloudSolrClient) now returns the count of core tracked as not live AKA zombies + instead of the full list of cores. This list is potentially VERY long which was causing high CPU and memory usage. Bug Fixes --------------------- diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java index 50841ba2e7e..2723465b739 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBSolrClient.java @@ -358,7 +358,10 @@ public Rsp request(Req req) throws SolrServerException, IOException { } } throw new SolrServerException( - "No live SolrServers available to handle this request:" + zombieServers.keySet(), ex); + "No live SolrServers available to handle this request. (Tracking " + + zombieServers.size() + + " not live)", + ex); } /**