From commits-return-609-archive-asf-public=cust-asf.ponee.io@zipkin.apache.org Tue Apr 30 16:14:12 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id DDFBD180651 for ; Tue, 30 Apr 2019 18:14:11 +0200 (CEST) Received: (qmail 32979 invoked by uid 500); 30 Apr 2019 16:14:11 -0000 Mailing-List: contact commits-help@zipkin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zipkin.apache.org Delivered-To: mailing list commits@zipkin.apache.org Received: (qmail 32970 invoked by uid 99); 30 Apr 2019 16:14:11 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Apr 2019 16:14:11 +0000 From: GitBox To: commits@zipkin.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 Message-ID: <155664084627.12335.2982489008041156374.gitbox@gitbox.apache.org> Date: Tue, 30 Apr 2019 16:14:06 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: ``` 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