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/02/19 14:40:19 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #4385: Fix NPE of decoding IntKeyLongValuesHashMap

wu-sheng commented on a change in pull request #4385: Fix NPE of decoding IntKeyLongValuesHashMap
URL: https://github.com/apache/skywalking/pull/4385#discussion_r381332910
 
 

 ##########
 File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/metrics/IntKeyLongValueHashMap.java
 ##########
 @@ -57,6 +58,9 @@ public String toStorageData() {
 
     @Override
     public void toObject(String data) {
+        if (Strings.isNullOrEmpty(data)) {
 
 Review comment:
   Personally, I want to say, this is harmful change. This `data` should not generate if there is no value of this column. `Calculate` func should make sure the `value` column is generated rather than using this `null` check. Such as `PercentileMetrics#calculate`, it guarantees the 5 values generated permanently. If there is no value, put the default value based on this metrics func, otherwise, which value should be shown up in the final query?

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