EvanLjp commented on a change in pull request #6499:
URL: https://github.com/apache/skywalking/pull/6499#discussion_r588864817



##########
File path: 
oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/StorageEsInstaller.java
##########
@@ -38,27 +41,50 @@
 @Slf4j
 public class StorageEsInstaller extends ModelInstaller {
     private final Gson gson = new Gson();
-
     private final StorageModuleElasticsearchConfig config;
     protected final ColumnTypeEsMapping columnTypeEsMapping;
 
+    /**
+     * The relation is between physical table and the specific structure 
definition.
+     */
+    private final ConcurrentHashMap<String, Map<String, Object>> tables;
+
     public StorageEsInstaller(Client client,
                               ModuleManager moduleManager,
-                              final StorageModuleElasticsearchConfig config) {
+                              StorageModuleElasticsearchConfig config) throws 
StorageException {
         super(client, moduleManager);
         this.columnTypeEsMapping = new ColumnTypeEsMapping();
         this.config = config;
+        this.tables = new ConcurrentHashMap<>(loadHistoryTables(client));

Review comment:
       now we are facing more complex conditions. Since the template is created 
dynamically, we do not know when to terminate. It is not enough to judge by the 
existence of index and template.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to