You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/03/17 04:46:16 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #4529: [hotfix] Fix AlarmQuery query condition issue

wu-sheng commented on a change in pull request #4529: [hotfix] Fix AlarmQuery query condition issue
URL: https://github.com/apache/skywalking/pull/4529#discussion_r393442613
 
 

 ##########
 File path: oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/query/AlarmQuery.java
 ##########
 @@ -64,7 +64,7 @@ public Alarms getAlarm(Integer scopeId, String keyword, int limit, int from, lon
                        .and(lte(InfluxClient.TIME, InfluxClient.timeInterval(endTB)));
         }
         if (!Strings.isNullOrEmpty(keyword)) {
-            recallQuery.and(regex(AlarmRecord.ALARM_MESSAGE, keyword));
+            recallQuery.and(contains(AlarmRecord.ALARM_MESSAGE, keyword.replaceAll("/", "\\/")));
 
 Review comment:
   Why four \? How many do we need?
   
   @kezhenxu94 we may need an e2e query for alarm in the future.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services