This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch remove-check in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit 8a7ee4b5cb9129d4a6feb0875a5bfdc8d6f4d32a Author: Wu Sheng <[email protected]> AuthorDate: Mon Sep 19 10:51:56 2022 +0800 Remove physical index existing check --- docs/en/changes/changes.md | 10 ++++++---- .../plugin/elasticsearch/base/StorageEsInstaller.java | 19 +------------------ 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 526c175bae..5a73ab7911 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -2,7 +2,6 @@ #### Project - #### OAP Server * Add component ID(133) for impala JDBC Java agent plugin and component ID(134) for impala server. @@ -13,14 +12,18 @@ * [**Breaking Change**] Change the LAL script format(Add layer property). * Adapt ElasticSearch 8.1+, migrate from removed APIs to recommended APIs. * Support monitoring MySQL slow SQLs. +* Remove physical index existing check and keep template existing check only to avoid meaningless `retry wait` + in `no-init` mode. #### UI * Fix: tab active incorrectly, when click tab space * Add impala icon for impala JDBC Java agent plugin. * (Webapp)Bump up snakeyaml to 1.31 for fixing CVE-2022-25857 -* [Breaking Change]: migrate from Spring Web to Armeria, now you should use the environment variable name `SW_OAP_ADDRESS` - to change the OAP backend service addresses, like `SW_OAP_ADDRESS=localhost:12800,localhost:12801`, and use environment +* [Breaking Change]: migrate from Spring Web to Armeria, now you should use the environment variable + name `SW_OAP_ADDRESS` + to change the OAP backend service addresses, like `SW_OAP_ADDRESS=localhost:12800,localhost:12801`, and use + environment variable `SW_SERVER_PORT` to change the port. Other Spring-related configurations don't take effect anymore. * Polish the endpoint list graph. * Fix styles for an adaptive height. @@ -31,5 +34,4 @@ #### Documentation - All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/149?closed=1) diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/StorageEsInstaller.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/StorageEsInstaller.java index 306709f64b..0f8e724a36 100644 --- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/StorageEsInstaller.java +++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/StorageEsInstaller.java @@ -79,24 +79,7 @@ public class StorageEsInstaller extends ModelInstaller { } return exist; } - boolean templateExists = esClient.isExistsTemplate(tableName); - final Optional<IndexTemplate> template = esClient.getTemplate(tableName); - boolean lastIndexExists = esClient.isExistsIndex(TimeSeriesUtils.latestWriteIndexName(model)); - - if ((templateExists && !template.isPresent()) || (!templateExists && template.isPresent())) { - throw new Error("[Bug warning] ElasticSearch client query template result is not consistent. " + - "Please file an issue to Apache SkyWalking.(https://github.com/apache/skywalking/issues)"); - } - - boolean exist = templateExists && lastIndexExists; - - if (exist) { - structures.putStructure( - tableName, template.get().getMappings() - ); - exist = structures.containsStructure(tableName, createMapping(model)); - } - return exist; + return esClient.isExistsTemplate(tableName); } @Override
