From 3f4e213d3d8d18f1dce7e694a0f0a5da4b0ee69e 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 6e858e0263bb0..1cf0e9a1f53ac 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)) ### Dependencies 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); } }