From issues-return-194758-archive-asf-public=cust-asf.ponee.io@flink.apache.org Tue Oct 16 10:47:09 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 17BBB180649 for ; Tue, 16 Oct 2018 10:47:08 +0200 (CEST) Received: (qmail 37931 invoked by uid 500); 16 Oct 2018 08:47:08 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 37809 invoked by uid 99); 16 Oct 2018 08:47:07 -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, 16 Oct 2018 08:47:07 +0000 From: GitBox To: issues@flink.apache.org Subject: [GitHub] zentol commented on a change in pull request #6850: [FLINK-10252] Handle oversized metric messges Message-ID: <153967962730.19125.16340661740959617309.gitbox@gitbox.apache.org> Date: Tue, 16 Oct 2018 08:47:07 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit zentol commented on a change in pull request #6850: [FLINK-10252] Handle oversized metric messges URL: https://github.com/apache/flink/pull/6850#discussion_r225449312 ########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/metrics/dump/MetricQueryService.java ########## @@ -109,7 +122,17 @@ public void onReceive(Object message) { } } else if (message instanceof CreateDump) { MetricDumpSerialization.MetricSerializationResult dump = serializer.serialize(counters, gauges, histograms, meters); - getSender().tell(dump, getSelf()); + + int realMsgSize = dump.serializedMetrics.length; + + if (realMsgSize > maximumFramesize) { + String overSizeErrorMsg = "The metric dump message size : " + realMsgSize + + " exceeds the maximum akka framesize : " + maximumFramesize + "."; + LOG.error(overSizeErrorMsg); + getSender().tell(new Status.Failure(new IOException(overSizeErrorMsg)), getSelf()); Review comment: While better than crashing a more reasonable option might be to create a new dump with reduced number of metrics. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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