From e9eddc905573e44f65d5dbd59e6a61d52866b7b0 Mon Sep 17 00:00:00 2001 From: Sarthak Aggarwal Date: Fri, 1 Sep 2023 11:05:34 +0530 Subject: [PATCH] incorporating review comments Signed-off-by: Sarthak Aggarwal --- CHANGELOG.md | 1 + .../licenses/zstd-jni-LICENSE.txt | 29 ------------------- .../licenses/zstd-jni-NOTICE.txt | 1 - .../index/codec/ZstdNotEnabledIT.java | 3 +- .../opensearch/index/engine/EngineConfig.java | 2 +- settings.gradle | 3 -- 6 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 plugins/custom-codecs/licenses/zstd-jni-LICENSE.txt delete mode 100644 plugins/custom-codecs/licenses/zstd-jni-NOTICE.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 80ab0fb87e609..c6860c7b46f41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -172,6 +172,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - [Remote Store] Implicitly use replication type SEGMENT for remote store clusters ([#9264](https://github.com/opensearch-project/OpenSearch/pull/9264)) - Use non-concurrent path for sort request on timeseries index and field([#9562](https://github.com/opensearch-project/OpenSearch/pull/9562)) - Added sampler based on `Blanket Probabilistic Sampling rate` and `Override for on demand` ([#9621](https://github.com/opensearch-project/OpenSearch/issues/9621)) +- Move ZStd to a plugin ([#9658](https://github.com/opensearch-project/OpenSearch/pull/9658)) ### Deprecated diff --git a/plugins/custom-codecs/licenses/zstd-jni-LICENSE.txt b/plugins/custom-codecs/licenses/zstd-jni-LICENSE.txt deleted file mode 100644 index c4dd507c1c72f..0000000000000 --- a/plugins/custom-codecs/licenses/zstd-jni-LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ ------------------------------------------------------------------------------ -** Beginning of "BSD License" text. ** - -Zstd-jni: JNI bindings to Zstd Library - -Copyright (c) 2015-present, Luben Karavelov/ All rights reserved. - -BSD License - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/plugins/custom-codecs/licenses/zstd-jni-NOTICE.txt b/plugins/custom-codecs/licenses/zstd-jni-NOTICE.txt deleted file mode 100644 index 389c97cbc892d..0000000000000 --- a/plugins/custom-codecs/licenses/zstd-jni-NOTICE.txt +++ /dev/null @@ -1 +0,0 @@ -The code for the JNI bindings to Zstd library was originally authored by Luben Karavelov diff --git a/server/src/internalClusterTest/java/org/opensearch/index/codec/ZstdNotEnabledIT.java b/server/src/internalClusterTest/java/org/opensearch/index/codec/ZstdNotEnabledIT.java index 738dc5f56330a..b499f608cf1c8 100644 --- a/server/src/internalClusterTest/java/org/opensearch/index/codec/ZstdNotEnabledIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/codec/ZstdNotEnabledIT.java @@ -13,7 +13,7 @@ import org.opensearch.test.OpenSearchIntegTestCase; @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) -public class ZstdNotEnabledIT extends OpenSearchIntegTestCase { +public class ZstdNotEnabledIT extends OpenSearchIntegTestCase { public void testZStdCodecsWithoutPluginInstalled() { @@ -34,5 +34,4 @@ public void testZStdCodecsWithoutPluginInstalled() { ); } - } diff --git a/server/src/main/java/org/opensearch/index/engine/EngineConfig.java b/server/src/main/java/org/opensearch/index/engine/EngineConfig.java index c9f5780c99cc7..484ee40f5faf1 100644 --- a/server/src/main/java/org/opensearch/index/engine/EngineConfig.java +++ b/server/src/main/java/org/opensearch/index/engine/EngineConfig.java @@ -139,7 +139,7 @@ public Supplier retentionLeasesSupplier() { // Though the external visible codec name is zstd or zstd_no_dict, internally it is registered as Lucene95CustomCodec // Hence this check is required, Lucene95CustomCodec will not be part of availableCodecs if the custom-codecs plugin // is not installed - if (("zstd".equals(s) || "zstd_no_dict".equals(s)) && Codec.availableCodecs().contains("Lucene95CustomCodec")){ + if (("zstd".equals(s) || "zstd_no_dict".equals(s)) && Codec.availableCodecs().contains("Lucene95CustomCodec")) { return s; } if (Codec.availableCodecs().contains(s) == false) { // we don't error message the not officially supported ones diff --git a/settings.gradle b/settings.gradle index 693e56625cb5d..c04b5997d49b1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -153,6 +153,3 @@ if (extraProjects.exists()) { addSubProjects('', extraProjectDir) } } -include 'plugins:custom-codecs' -findProject(':plugins:custom-codecs')?.name = 'custom-codecs' -