This is an automated email from the ASF dual-hosted git repository.

lingmiao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new d82d48d  [Doris On ES][Bug-fix] Sync ES metadata failure after restart 
or upgrade FE (#3961)
d82d48d is described below

commit d82d48da877f63a951cef83ddb44ec8adde9fe22
Author: Yunfeng,Wu <[email protected]>
AuthorDate: Mon Jun 29 14:13:07 2020 +0800

    [Doris On ES][Bug-fix] Sync ES metadata failure after restart or upgrade FE 
(#3961)
    
    ISSUE:#3960
    PR #3454 introduce the caching for EsClient, but the initialization of the 
client was only during editlog replay, all this work should done also during 
image replay.
    
    This happens when restart or upgrade FE
    
    BTW: modify a UT failure for metric
---
 .../main/java/org/apache/doris/external/elasticsearch/EsRepository.java | 2 +-
 fe/src/test/java/org/apache/doris/metric/MetricsTest.java               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/fe/src/main/java/org/apache/doris/external/elasticsearch/EsRepository.java 
b/fe/src/main/java/org/apache/doris/external/elasticsearch/EsRepository.java
index fe574ce..2cfcf4c 100644
--- a/fe/src/main/java/org/apache/doris/external/elasticsearch/EsRepository.java
+++ b/fe/src/main/java/org/apache/doris/external/elasticsearch/EsRepository.java
@@ -93,7 +93,7 @@ public class EsRepository extends MasterDaemon {
             List<Table> tables = database.getTables();
             for (Table table : tables) {
                 if (table.getType() == TableType.ELASTICSEARCH) {
-                    esTables.put(table.getId(), (EsTable) table);
+                    registerTable((EsTable) table);
                 }
             }
         }
diff --git a/fe/src/test/java/org/apache/doris/metric/MetricsTest.java 
b/fe/src/test/java/org/apache/doris/metric/MetricsTest.java
index b2e9fd6..7ad28e2 100644
--- a/fe/src/test/java/org/apache/doris/metric/MetricsTest.java
+++ b/fe/src/test/java/org/apache/doris/metric/MetricsTest.java
@@ -36,7 +36,7 @@ public class MetricsTest {
     @Test
     public void testTcpMetrics() {
         List<Metric> metrics = MetricRepo.getMetricsByName("snmp");
-        Assert.assertEquals(2, metrics.size());
+        Assert.assertEquals(4, metrics.size());
         for (Metric metric : metrics) {
             GaugeMetric<Long> gm = (GaugeMetric<Long>) metric;
             if (gm.getLabels().get(0).getValue().equals("tcp_retrans_segs")) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to