From d4e646bf42c3d76618e3e884d610ac44e088aa6a Mon Sep 17 00:00:00 2001 From: Karen X Date: Wed, 26 Nov 2025 08:41:23 +0000 Subject: [PATCH] plugin service allow multiple extended plugins both extend the same module/plugin Signed-off-by: Karen X --- CHANGELOG.md | 1 + .../main/java/org/opensearch/plugins/PluginsService.java | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1838db443bd06..ddb0bae909c06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Allow the truncate filter in normalizers ([#19778](https://github.com/opensearch-project/OpenSearch/issues/19778)) - Support pull-based ingestion message mappers and raw payload support ([#19765](https://github.com/opensearch-project/OpenSearch/pull/19765)) - Support dynamic consumer configuration update in pull-based ingestion ([#19963](https://github.com/opensearch-project/OpenSearch/pull/19963)) +- Relax jar hell check when extended plugins share transitive dependencies ([#20103](https://github.com/opensearch-project/OpenSearch/pull/20103)) ### Changed - Faster `terms` query creation for `keyword` field with index and docValues enabled ([#19350](https://github.com/opensearch-project/OpenSearch/pull/19350)) diff --git a/server/src/main/java/org/opensearch/plugins/PluginsService.java b/server/src/main/java/org/opensearch/plugins/PluginsService.java index 6c06e00c5b04f..f2cb42ca1864a 100644 --- a/server/src/main/java/org/opensearch/plugins/PluginsService.java +++ b/server/src/main/java/org/opensearch/plugins/PluginsService.java @@ -728,8 +728,11 @@ static void checkBundleJarHell(Set classpath, Bundle bundle, Map intersection = new HashSet<>(urls); intersection.retainAll(pluginUrls); if (intersection.isEmpty() == false) { - throw new IllegalStateException( - "jar hell! extended plugins " + exts + " have duplicate codebases with each other: " + intersection + logger.info( + "Plugin [{}] extends multiple plugins/modules that share common dependencies: {}. " + + "This is expected when extended plugins share common ancestors.", + bundle.plugin.getName(), + intersection ); }