zipkin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-zipkin] Logic-32 commented on a change in pull request #2502: Adding storage-throttle module to address "over capacity" issues
Date Tue, 30 Apr 2019 16:14:06 GMT
Logic-32 commented on a change in pull request #2502: Adding storage-throttle module to address
"over capacity" issues
URL: https://github.com/apache/incubator-zipkin/pull/2502#discussion_r279828433
 
 

 ##########
 File path: zipkin-collector/core/src/main/java/zipkin2/collector/Collector.java
 ##########
 @@ -227,7 +228,13 @@ RuntimeException doError(String message, Throwable e) {
         message = format("%s due to %s(%s)", message, e.getClass().getSimpleName(), error);
         warn(message, e);
       }
-      return new RuntimeException(message, e);
 
 Review comment:
   Complications with this specific method:
   1. We're expected to return a RuntimeException so I can't avoid wrapping Errors without
specifically throwing them.
   2. Part of the purpose of this method seems to be to wrap the Exception and add a specific
message.  There are a lot of tests around this fact.  Example test failures:
       ```
       CollectorTest.errorDecoding_onErrorWithMessage:158 expected:<"[Cannot decode spans
due to IllegalArgumentException(no beer)]"> but was:<"[no beer]">
       CollectorTest.errorDecoding_onErrorWithNullMessage:150 expected:<"Cannot decode
spans due to RuntimeException()"> but was:<null>
       ```
   
   I'd like to update this because I agree with the change but I feel like the change would
be more worthy of a different issue/pull request.  What do you think?

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

Mime
View raw message