Skip to content

Commit

Permalink
[warehouse]bugfix: fix td-engine store table not exist log (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChineseTony authored May 27, 2022
1 parent a02238f commit 0882519
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public class TdEngineDataStorage implements DisposableBean {
private static final String QUERY_INSTANCE_SQL
= "SELECT DISTINCT instance FROM %s WHERE ts >= now - 1w";

private static final String TABLE_NOT_EXIST
= "Table does not exist";

public TdEngineDataStorage(WarehouseWorkerPool workerPool, WarehouseProperties properties,
MetricsDataExporter dataExporter) {
this.workerPool = workerPool;
Expand Down Expand Up @@ -266,7 +269,10 @@ public Map<String, List<Value>> getHistoryMetricData(Long monitorId, String app,
resultSet.close();
return instanceValuesMap;
} catch (SQLException sqlException) {
log.warn(sqlException.getMessage());
String msg = sqlException.getMessage();
if (msg != null && !msg.contains(TABLE_NOT_EXIST)) {
log.warn(sqlException.getMessage());
}
} catch (Exception e) {
log.error(e.getMessage(), e);
} finally {
Expand Down

0 comments on commit 0882519

Please sign in to comment.