File tree 3 files changed +6
-18
lines changed
core/src/java/org/apache/solr/core
test-framework/src/java/org/apache/solr
3 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -1138,9 +1138,7 @@ public void shutdown() {
1138
1138
} finally {
1139
1139
try {
1140
1140
if (updateShardHandler != null ) {
1141
- customThreadPool .submit (() -> Collections .singleton (shardHandlerFactory ).parallelStream ().forEach (c -> {
1142
- updateShardHandler .close ();
1143
- }));
1141
+ customThreadPool .submit (() -> updateShardHandler .close ());
1144
1142
}
1145
1143
} finally {
1146
1144
try {
Original file line number Diff line number Diff line change @@ -414,9 +414,7 @@ protected String getShardsString() {
414
414
protected void destroyServers () throws Exception {
415
415
ExecutorService customThreadPool = ExecutorUtil .newMDCAwareCachedThreadPool (new SolrNamedThreadFactory ("closeThreadPool" ));
416
416
417
- customThreadPool .submit (() -> Collections .singleton (controlClient ).parallelStream ().forEach (c -> {
418
- IOUtils .closeQuietly (c );
419
- }));
417
+ customThreadPool .submit (() -> IOUtils .closeQuietly (controlClient ));
420
418
421
419
customThreadPool .submit (() -> {
422
420
try {
Original file line number Diff line number Diff line change @@ -1732,25 +1732,17 @@ public void distribTearDown() throws Exception {
1732
1732
protected void destroyServers () throws Exception {
1733
1733
ExecutorService customThreadPool = ExecutorUtil .newMDCAwareCachedThreadPool (new SolrNamedThreadFactory ("closeThreadPool" ));
1734
1734
1735
- customThreadPool .submit (() -> Collections .singleton (commonCloudSolrClient ).parallelStream ().forEach (c -> {
1736
- IOUtils .closeQuietly (c );
1737
- }));
1735
+ customThreadPool .submit (() -> IOUtils .closeQuietly (commonCloudSolrClient ));
1738
1736
1739
- customThreadPool .submit (() -> Collections .singleton (controlClient ).parallelStream ().forEach (c -> {
1740
- IOUtils .closeQuietly (c );
1741
- }));
1737
+ customThreadPool .submit (() -> IOUtils .closeQuietly (controlClient ));
1742
1738
1743
1739
customThreadPool .submit (() -> coreClients .parallelStream ().forEach (c -> {
1744
1740
IOUtils .closeQuietly (c );
1745
1741
}));
1746
1742
1747
- customThreadPool .submit (() -> Collections .singletonList (controlClientCloud ).parallelStream ().forEach (c -> {
1748
- IOUtils .closeQuietly (c );
1749
- }));
1743
+ customThreadPool .submit (() -> IOUtils .closeQuietly (controlClientCloud ));
1750
1744
1751
- customThreadPool .submit (() -> Collections .singletonList (cloudClient ).parallelStream ().forEach (c -> {
1752
- IOUtils .closeQuietly (c );
1753
- }));
1745
+ customThreadPool .submit (() -> IOUtils .closeQuietly (cloudClient ));
1754
1746
1755
1747
ExecutorUtil .shutdownAndAwaitTermination (customThreadPool );
1756
1748
You can’t perform that action at this time.
0 commit comments