hanahmily commented on a change in pull request #5637:
URL: https://github.com/apache/skywalking/pull/5637#discussion_r502506536



##########
File path: 
oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/InfluxClient.java
##########
@@ -101,11 +113,10 @@ private InfluxDB getInflux() {
 
         try {
             QueryResult result = getInflux().query(new 
Query(query.getCommand()));
-            if (result.hasError()) {
-                throw new IOException(result.getError());
-            }
+            healthChecker.health();

Review comment:
       The test of result.hasError is dropped. Maybe some errors are ignored. 
Pls double check whether it leaves out them.

##########
File path: 
oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/InfluxClient.java
##########
@@ -205,4 +230,20 @@ public static TimeInterval timeIntervalTS(long timestamp) {
     public static TimeInterval timeIntervalTB(long timeBucket) {
         return ti(TimeBucket.getTimestamp(timeBucket), "ms");
     }
+
+    @Override
+    public void registerChecker(HealthChecker healthChecker) {
+        this.healthChecker.register(healthChecker);
+    }
+
+    /**
+     * Check influx health, Ignore grammar related exception

Review comment:
       Why do you ignore grammar relevant errors? They would indicate the 
version mismatches between OAP and influxdb server.

##########
File path: 
oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/InfluxClient.java
##########
@@ -161,11 +172,7 @@ public int getCounter(Query query) throws IOException {
      */
     public void dropSeries(String measurement, long timeBucket) throws 
IOException {
         Query query = new Query("DROP SERIES FROM " + measurement + " WHERE 
time_bucket='" + timeBucket + "'");
-        QueryResult result = getInflux().query(query);
-
-        if (result.hasError()) {
-            throw new IOException("Statement: " + query.getCommand() + ", 
ErrorMsg: " + result.getError());
-        }
+        this.query(query);

Review comment:
       Ditto 




----------------------------------------------------------------
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