From 91f1e9517316d5bbc919a961bb1178d6bf26c67d Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Mon, 2 Dec 2024 10:12:10 -0500 Subject: [PATCH] SOLR-17577: Remove dead system property (#2888) (cherry picked from commit 5f888e548ad77da40bb1881392a6f06b6c800018) --- solr/CHANGES.txt | 2 ++ .../src/java/org/apache/solr/handler/IndexFetcher.java | 7 +------ .../solr/handler/TestHealthCheckHandlerLegacyMode.java | 3 --- .../org/apache/solr/handler/TestReplicationHandler.java | 3 --- .../solr/handler/TestReplicationHandlerDiskOverFlow.java | 3 --- 5 files changed, 3 insertions(+), 15 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 9c99c063be9..304bd18eb81 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -138,6 +138,8 @@ led to the suppression of exceptions. (Andrey Bozhko) * SOLR-17556: "home" and "data" directories used by Solr examples have been updated to align with documented best practices. (Eric Pugh, Houston Putman) +* SOLR-17577: Remove "solr.indexfetcher.sotimeout" system property that was for optimizing replication tests. It was disabled, but not removed. (Eric Pugh) + ================== 9.7.1 ================== Bug Fixes --------------------- diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java index 0a017908967..049af659b3c 100644 --- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java +++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java @@ -305,13 +305,8 @@ public IndexFetcher( useInternalCompression = ReplicationHandler.INTERNAL.equals(compress); useExternalCompression = ReplicationHandler.EXTERNAL.equals(compress); connTimeout = getParameter(initArgs, HttpClientUtil.PROP_CONNECTION_TIMEOUT, 30000, null); + soTimeout = getParameter(initArgs, HttpClientUtil.PROP_SO_TIMEOUT, 120000, null); - // allow a leader override for tests - you specify this in /replication follower section of - // solrconfig and some test don't want to define this - soTimeout = Integer.getInteger("solr.indexfetcher.sotimeout", -1); - if (soTimeout == -1) { - soTimeout = getParameter(initArgs, HttpClientUtil.PROP_SO_TIMEOUT, 120000, null); - } String httpBasicAuthUser = (String) initArgs.get(HttpClientUtil.PROP_BASIC_AUTH_USER); String httpBasicAuthPassword = (String) initArgs.get(HttpClientUtil.PROP_BASIC_AUTH_PASS); solrClient = diff --git a/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java b/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java index 3de554c1a4c..75c75321a10 100644 --- a/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java +++ b/solr/core/src/test/org/apache/solr/handler/TestHealthCheckHandlerLegacyMode.java @@ -76,8 +76,6 @@ public void setUp() throws Exception { buildUrl(followerJetty.getLocalPort(), context), DEFAULT_TEST_CORENAME); followerClientHealthCheck = ReplicationTestHelper.createNewSolrClient(buildUrl(followerJetty.getLocalPort(), context)); - - System.setProperty("solr.indexfetcher.sotimeout2", "45000"); } public void clearIndexWithReplication() throws Exception { @@ -118,7 +116,6 @@ public void tearDown() throws Exception { followerClientHealthCheck.close(); followerClientHealthCheck = null; } - System.clearProperty("solr.indexfetcher.sotimeout"); } @Test diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java index 903635be9c2..930a5a2b11f 100644 --- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java +++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java @@ -136,8 +136,6 @@ public void setUp() throws Exception { followerClient = ReplicationTestHelper.createNewSolrClient( buildUrl(followerJetty.getLocalPort(), context), DEFAULT_TEST_CORENAME); - - System.setProperty("solr.indexfetcher.sotimeout2", "45000"); } public void clearIndexWithReplication() throws Exception { @@ -170,7 +168,6 @@ public void tearDown() throws Exception { followerClient.close(); followerClient = null; } - System.clearProperty("solr.indexfetcher.sotimeout"); } static JettySolrRunner createAndStartJetty(SolrInstance instance) throws Exception { diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerDiskOverFlow.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerDiskOverFlow.java index 67b5cc47d9c..7bd54f68c77 100644 --- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerDiskOverFlow.java +++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerDiskOverFlow.java @@ -92,8 +92,6 @@ public void setUp() throws Exception { followerClient = ReplicationTestHelper.createNewSolrClient( TestReplicationHandler.buildUrl(followerJetty.getLocalPort()), DEFAULT_TEST_CORENAME); - - System.setProperty("solr.indexfetcher.sotimeout2", "45000"); } @Override @@ -118,7 +116,6 @@ public void tearDown() throws Exception { followerClient = null; } System.clearProperty(TEST_URL_ALLOW_LIST); - System.clearProperty("solr.indexfetcher.sotimeout"); IndexFetcher.usableDiskSpaceProvider = originalDiskSpaceprovider; IndexFetcher.testWait = originalTestWait;