From 280dd0a14fdfda3c3caa0814063f2168e7e544f0 Mon Sep 17 00:00:00 2001 From: Chengwu Shi Date: Tue, 14 May 2024 14:24:20 +1000 Subject: [PATCH] Responded to feedback from Andrew Ross, fixed typo, spelling, added shudownNow() and Thread.currentThread().interrupt() Signed-off-by: Chengwu Shi --- CHANGELOG.md | 2 +- .../opensearch/repositories/azure/AzureStorageService.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d08100728ecd..5487d7555c970 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased 2.x] ### Added -- Added support for Azure Managed Identity in repository-azure ([#12423](https://github.com/opensearch-project/OpenSearch/issues/12423)) +- Add support for Azure Managed Identity in repository-azure ([#12423](https://github.com/opensearch-project/OpenSearch/issues/12423)) - Add useCompoundFile index setting ([#13478](https://github.com/opensearch-project/OpenSearch/pull/13478)) - Make outbound side of transport protocol dependent ([#13293](https://github.com/opensearch-project/OpenSearch/pull/13293)) diff --git a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java index 70e5f241fc2bb..f39ed185d8b35 100644 --- a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java +++ b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java @@ -336,9 +336,11 @@ public void close() throws IOException { this.executor.shutdown(); try { if (this.executor.awaitTermination(30, TimeUnit.SECONDS) == false) { - logger.warning("The executor was not shutdown gracefuly with 30 seconds"); + this.executor.shutdownNow(); + logger.warning("The executor was not shutdown gracefully with 30 seconds"); } } catch (final InterruptedException ex) { + Thread.currentThread().interrupt(); throw new IOException(ex); } }