From 1a2325a08f3f031726cd3cf2f3670a739c3fc4e8 Mon Sep 17 00:00:00 2001 From: Munendra S N Date: Sat, 28 Mar 2020 11:53:21 +0530 Subject: [PATCH] SOLR-13893: fix typo in BlobRepository's max jar size sys property * runtime.lib.size is the new property name --- solr/CHANGES.txt | 3 +++ .../src/java/org/apache/solr/core/BlobRepository.java | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 95225c15c75..45f1fcf77a2 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -111,6 +111,9 @@ Other Changes * SOLR-13842: Remove redundant defaults from ImplicitPlugins.json (Munendra S N) +* SOLR-13893: BlobRepository reads max jar size from `runtime.lib.size` system property. Old `runtme.lib.size` is Deprecated + (Erick Erickson, Kesharee Nandan Vishwakarma, Munendra S N) + ================== 8.5.0 ================== Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release. diff --git a/solr/core/src/java/org/apache/solr/core/BlobRepository.java b/solr/core/src/java/org/apache/solr/core/BlobRepository.java index 59bd795dea3..1d4628bee43 100644 --- a/solr/core/src/java/org/apache/solr/core/BlobRepository.java +++ b/solr/core/src/java/org/apache/solr/core/BlobRepository.java @@ -60,7 +60,13 @@ import static org.apache.solr.common.cloud.ZkStateReader.BASE_URL_PROP; * The purpose of this class is to store the Jars loaded in memory and to keep only one copy of the Jar in a single node. */ public class BlobRepository { - private static final long MAX_JAR_SIZE = Long.parseLong(System.getProperty("runtme.lib.size", String.valueOf(5 * 1024 * 1024))); + + @Deprecated + private static final long OLD_MAX_JAR_SIZE = Long.parseLong( + System.getProperty("runtme.lib.size", String.valueOf(5 * 1024 * 1024))); + + private static final long MAX_JAR_SIZE = Long.parseLong( + System.getProperty("runtime.lib.size", String.valueOf(OLD_MAX_JAR_SIZE))); private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); public static final Random RANDOM; static final Pattern BLOB_KEY_PATTERN_CHECKER = Pattern.compile(".*/\\d+");