[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
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user