Skip to content

Commit d82d48d

Browse files
authored
[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
1 parent 55c058e commit d82d48d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎fe/src/main/java/org/apache/doris/external/elasticsearch/EsRepository.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void loadTableFromCatalog() {
9393
List<Table> tables = database.getTables();
9494
for (Table table : tables) {
9595
if (table.getType() == TableType.ELASTICSEARCH) {
96-
esTables.put(table.getId(), (EsTable) table);
96+
registerTable((EsTable) table);
9797
}
9898
}
9999
}

‎fe/src/test/java/org/apache/doris/metric/MetricsTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void setUp() {
3636
@Test
3737
public void testTcpMetrics() {
3838
List<Metric> metrics = MetricRepo.getMetricsByName("snmp");
39-
Assert.assertEquals(2, metrics.size());
39+
Assert.assertEquals(4, metrics.size());
4040
for (Metric metric : metrics) {
4141
GaugeMetric<Long> gm = (GaugeMetric<Long>) metric;
4242
if (gm.getLabels().get(0).getValue().equals("tcp_retrans_segs")) {

0 commit comments

Comments
 (0)