Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D309F200CD2 for ; Thu, 27 Jul 2017 22:37:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D12A716B907; Thu, 27 Jul 2017 20:37:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 22EDD16B905 for ; Thu, 27 Jul 2017 22:37:51 +0200 (CEST) Received: (qmail 79722 invoked by uid 500); 27 Jul 2017 20:37:51 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 79710 invoked by uid 99); 27 Jul 2017 20:37:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jul 2017 20:37:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6FD15C004A for ; Thu, 27 Jul 2017 20:37:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id kOcE59886Yxl for ; Thu, 27 Jul 2017 20:37:49 +0000 (UTC) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id EBB465FCC7 for ; Thu, 27 Jul 2017 20:37:48 +0000 (UTC) Received: by mail-wm0-f43.google.com with SMTP id m85so5564182wma.0 for ; Thu, 27 Jul 2017 13:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=P0NLcP0tw1FB68HO5PdXSfOnW4+lcbmi6RbkHYbgpgA=; b=rS0IPHgZITuEZIVJxdfzQkhirZh2zz99XZrejwMo23QZrzfT0COn31Cj8YnLm1eLVS iIPCJYm0v2INPsHXImI0cCc8+eNaoV4sSjPV4FOp0KfZm2gB4jeqDOuMKpJcYucChImu +4BLY6D/5YyoLV/LcuQeAYjdL4Xbm+/nuHxxOnvIPDuxmJ1gHpOwiFWeUPbqr94hHOS9 og5IRAQpADjTX9f8p5kJ2MklGqjQ6rLWLiukgsnIv+3YXlbgye3DFy9cOuP0aB2YPtzA Jwh9RcstGcNRk85XlG1JrtGfs4895FTVAlxigG3iK2RmVr9Rc3xcGe73MABpIOTTimZw Jm9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=P0NLcP0tw1FB68HO5PdXSfOnW4+lcbmi6RbkHYbgpgA=; b=PFSykNjaqm8iq9wPApzPlG48KJwv5XdXOBXtS/ugzytx9dwMmr5dZT/3wIf/goExus PPx72J5wiAdFm+J7yLjS6PMEDHlalc2qi9fUjeqHSx/YWfDx8yYqP3E8C/o+AuXfRC1n zedfSenmtQrgQ2OoozuSA6PUiVDzJoZ+68pxewmOATZ3tceaAUqAyI4RMsqaZIP1Ik/0 b80tHOFLJmFY9inbmlm/Z47yQbAxaA+X+mMwHuIwgvIVHCqfiKwYsDlD4CymaZXBnfs4 oOvQt03ZDjPMlEhwxn19h+98CxQBlXWT6nQgJjYgMKaB5UFG8G/a7J7Hr1rud4Q2NpxP MJxg== X-Gm-Message-State: AIVw111P6nZfGkED9VRAh3WtETILmKt/SVQvszC7e6nK8zzD0fMTpdZH 5TZJt7M6dIee+RzOPgmMXL9H6eUczA== X-Received: by 10.80.139.1 with SMTP id l1mr4608403edl.200.1501187868434; Thu, 27 Jul 2017 13:37:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.173.227 with HTTP; Thu, 27 Jul 2017 13:37:17 -0700 (PDT) In-Reply-To: References: From: Valentin Kulichenko Date: Thu, 27 Jul 2017 13:37:17 -0700 Message-ID: Subject: Re: Assertions as binary data validation checks in deserialization To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="94eb2c195822a3a72605555289cd" archived-at: Thu, 27 Jul 2017 20:37:53 -0000 --94eb2c195822a3a72605555289cd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Makes sense to me. Feel free to create a ticket unless someone else has any objection. However, I think that we should revise other code for such places then. Fixing only this one line doesn't change a lot. -Val On Thu, Jul 27, 2017 at 12:55 PM, Andrey Kuznetsov wrote: > Indeed, "let it crash" approach is better than unclear error in some > indeterminate place later. Here we depend on data from "inpredictable" > source, so assertions are not suitable. > > 27 =D0=B8=D1=8E=D0=BB=D1=8F 2017 =D0=B3. 22:35 =D0=BF=D0=BE=D0=BB=D1=8C= =D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C "Valentin Kulichenko" < > valentin.kulichenko@gmail.com> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB= : > > Do you suggest to throw an exception instead of assertions? > > -Val > --94eb2c195822a3a72605555289cd--