You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mu...@apache.org on 2020/03/28 06:41:48 UTC

[lucene-solr] 04/05: SOLR-13893: fix typo in BlobRepository's max jar size sys property

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

munendrasn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 1a2325a08f3f031726cd3cf2f3670a739c3fc4e8
Author: Munendra S N <mu...@apache.org>
AuthorDate: Sat Mar 28 11:53:21 2020 +0530

    SOLR-13893: fix typo in BlobRepository's max jar size sys property
    
    * runtime.lib.size is the new property name
---
 solr/CHANGES.txt                                            | 3 +++
 solr/core/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 95225c1..45f1fcf 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 59bd795..1d4628b 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+");