File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3 Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1818import org .elasticsearch .common .settings .ProjectSecrets ;
1919import org .elasticsearch .common .settings .Settings ;
2020import org .elasticsearch .common .util .Maps ;
21+ import org .elasticsearch .common .util .concurrent .AbstractRunnable ;
2122import org .elasticsearch .core .IOUtils ;
2223import org .elasticsearch .core .Nullable ;
2324import org .elasticsearch .logging .LogManager ;
@@ -143,9 +144,18 @@ public void applyClusterState(ClusterChangedEvent event) {
143144 }
144145
145146 private void closeClientsAsync (List <ClientsHolder > clientsHoldersToClose , ActionListener <Void > listener ) {
146- executor .execute (() -> {
147- IOUtils .closeWhileHandlingException (clientsHoldersToClose );
148- listener .onResponse (null );
147+ executor .execute (new AbstractRunnable () {
148+ @ Override
149+ protected void doRun () throws Exception {
150+ IOUtils .closeWhileHandlingException (clientsHoldersToClose );
151+ listener .onResponse (null );
152+ }
153+
154+ @ Override
155+ public void onFailure (Exception e ) {
156+ logger .warn ("Failed to close s3 clients" , e );
157+ listener .onFailure (e );
158+ }
149159 });
150160 }
151161
You can’t perform that action at this time.
0 commit comments