From dev-return-43644-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Thu Dec 20 15:25:55 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 2BECB180648 for ; Thu, 20 Dec 2018 15:25:55 +0100 (CET) Received: (qmail 7407 invoked by uid 500); 20 Dec 2018 14:25:54 -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 7382 invoked by uid 99); 20 Dec 2018 14:25:53 -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, 20 Dec 2018 14:25:53 +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 298B5C21E1 for ; Thu, 20 Dec 2018 14:25:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.798 X-Spam-Level: * X-Spam-Status: No, score=1.798 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 9LEx6VvEOCM6 for ; Thu, 20 Dec 2018 14:25:51 +0000 (UTC) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D0F7460DB3 for ; Thu, 20 Dec 2018 14:25:50 +0000 (UTC) Received: by mail-qt1-f175.google.com with SMTP id r14so1988940qtp.1 for ; Thu, 20 Dec 2018 06:25:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=vJLrVT1KyJV+WqjeMUWMcriafv6UFxbARQfcUwA62Eo=; b=KEIaqaJshYSkB17bxGPZ+uReiXZMrRUYRykOrE0aft1MQg3Xw+Q3JRS3DR4OrxqW2/ syqaFfG8CXv2von0yVripoJ/0Usd84dLOknk+SglRBAE2wPPTXPPSyBKaJBCjNsMOt26 OuYNi4IUEYzE7ljpKORTwiPaosaZty2wXfIOgoHATBt/5yxRJlmDeQLkgm3qMxW4WZPy TQmqzPOHZvfBgwMs0+FamBEoXilyF5eoLeGcHmvWU/hcIkDVBhBqhAgIeiU4eosPWI/B mqjfocXiAwzXHfxHrbrpzGpWJKBJhCXWQ6BLfxkz+8gOtauNEed8ZBQ6nwNGdQet4/Im OFsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=vJLrVT1KyJV+WqjeMUWMcriafv6UFxbARQfcUwA62Eo=; b=hus/Ehf5w4sO/DMaQqpfNPJDMyhCnuC/dx4ZIMruhQT9pCoOJnfcHwJYQBcrUjDAGU tuUEnPsw+LCDeYxm9+vKDAUEjPj2avA+WsJIV1lbclNciMKKhDvyYNdkoKEUd3rHLfVK tUktr+1MSrLhXGfvZoPT2rN9Eldni1y+/9xb4e9cesnSGx5COwwbKI7bvdpphblSNg6P AZ+Ap56+UUWxkzc1F2s6J15a3F3NFkEMNdCEvPRCZ/hIAoISQ5/lLOdk5leXiI9vblBq NM0ct6b0+9ehoEWW8t3FfqECh52D6Jf5Ttcj2qrAhqz93n3ztC/zhIDv2GJvlYJ4l9cD AxXw== X-Gm-Message-State: AA+aEWYrosenGF2VgH5R2IWwCKV94Fh7EeglfXERVV5YBzJuRjkZ7hOR RMl8xLTnWNnlG2TXnBJVgpQmht8QAl5KDbzA/GUTLg== X-Google-Smtp-Source: AFSGD/VPKmNW9sAWjxhaZdHH1uuakEpnT6Fif+OfBj7oU4Gf0FACntUQlvtWPu4ZfajgTDu3fhup3yGxSEY322WNBEs= X-Received: by 2002:ac8:7950:: with SMTP id r16mr19905282qtt.12.1545315950172; Thu, 20 Dec 2018 06:25:50 -0800 (PST) MIME-Version: 1.0 References: <5c1b951a.1c69fb81.507fe.a64a@mx.google.com> <5c1ba52d.1c69fb81.4e674.bddf@mx.google.com> In-Reply-To: <5c1ba52d.1c69fb81.4e674.bddf@mx.google.com> From: Ilya Kasnacheev Date: Thu, 20 Dec 2018 17:25:38 +0300 Message-ID: Subject: Re: REST GridCacheCommandHandler writes ERROR in log in case ofbaduser input To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="000000000000469c8b057d74e8e2" --000000000000469c8b057d74e8e2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello! We often rely on server nodes' logs since there is always possibility that client will swallow our error, especially when we discover internal errors. We could try and isolate cases when we are sure that there is error on user side, change log level for such errors. Regards, --=20 Ilya Kasnacheev =D1=87=D1=82, 20 =D0=B4=D0=B5=D0=BA. 2018 =D0=B3. =D0=B2 17:20, Stanislav L= ukyanov : > I think that the error detected in the server=E2=80=99s SQL engine is INF= O or even > DEBUG =E2=80=93 for the server it is just a normal workflow. > > At the same time the error needs to be propagated to the client =E2=80=93= and > shown to the user as an exception, error code in the response, etc. > > Stan > > From: Ilya Kasnacheev > Sent: 20 =D0=B4=D0=B5=D0=BA=D0=B0=D0=B1=D1=80=D1=8F 2018 =D0=B3. 16:31 > To: dev@ignite.apache.org > Subject: Re: REST GridCacheCommandHandler writes ERROR in log in case > ofbaduser input > > Hello! > > Where should user-specified SQL errors and REST call parameter errors fal= l > in this scheme? > > Regards, > -- > Ilya Kasnacheev > > > =D1=87=D1=82, 20 =D0=B4=D0=B5=D0=BA. 2018 =D0=B3. =D0=B2 16:12, Stanislav= Lukyanov : > > > +1. > > > > ERROR and even WARNING messages are often treated as incidents in the > > production systems. > > Ignite produces a lot of these messages though. > > > > I=E2=80=99d suggest the following as a rule of thumb: > > - ERROR =E2=80=93 we=E2=80=99re sure there is an issue with a node/clus= ter that needs > > attention; cluster stability and/or data integrity are in danger > > - WARNING =E2=80=93 we=E2=80=99re not sure, but something might be wron= g =E2=80=93 cluster > > stability and/or data integrity could be in danger; we can=E2=80=99t ve= rify if > > that=E2=80=99s an error or not, so user attention is needed > > - INFO =E2=80=93 anything that we=E2=80=99d like to have in the logs wh= ich doesn=E2=80=99t > > indicate an unrecoverable problem (or possibility of it) > > - DEBUG =E2=80=93 anything that we=E2=80=99d like to have in the logs b= ut which would > > produce too much logging; can be enabled on testing environments for > > selected packages though > > - TRACE =E2=80=93 anything that we=E2=80=99d like to have for deep debu= gging which > > probably wouldn=E2=80=99t help anyone but Ignite developers; can produc= e enormous > > amount of logs > > > > WDYT? > > > > Stan > > > > From: Sergey Kozlov > > Sent: 20 =D0=B4=D0=B5=D0=BA=D0=B0=D0=B1=D1=80=D1=8F 2018 =D0=B3. 15:53 > > To: dev@ignite.apache.org > > Subject: Re: REST GridCacheCommandHandler writes ERROR in log in case o= f > > baduser input > > > > Denis > > > > I can't agree with you. > > > > Apache Ignite is the compute platform. It means that an exception on a > > server node looks like an alarm that something went wrong or even broke= n. > > I think if we can catch the mistake from user request and return the > > correct response (e.g. with error code) is good enough and does not > require > > throw the exception on nodes. > > From the that standpoint the WARNING or even DEBUG is most suitable lev= el > > to report such issues. Same approach may be used more widely for instan= ce > > for wrong sql syntax. > > > > > > > > > > > > On Fri, Dec 14, 2018 at 9:35 PM Denis Magda wrote: > > > > > Hello Ilya, > > > > > > It's fine to use ERROR level if an operation can't be completed due t= o > > > missing parameters. That's, in fact, an exception/error. What needs t= o > be > > > changed is texts of messages so that everyone understands what exactl= y > > > happened and how to address a failure. > > > > > > -- > > > Denis > > > > > > > > > On Fri, Dec 14, 2018 at 5:45 AM Ilya Kasnacheev < > > ilya.kasnacheev@gmail.com > > > > > > > wrote: > > > > > > > Hello! > > > > > > > > It seems that we have subj behavior since the earliest days if Apac= he > > > > Ignite. > > > > > > > > If you send a REST command with error in it (such as missing "keys" > for > > > > getAll), you will get a nice > > > > [2018-10-30 > 22:22:14,021][ERROR][rest-#61061][GridCacheCommandHandler] > > > > Failed to execute cache command: GridRestCacheRequest > > > > error in your logs. > > > > > > > > Which is probably an overkill since ERROR usually means unexpected > and > > > > severe errors in application code as opposed to user input validati= on > > > > errors. > > > > > > > > This made worse by the fact that you can have some automatic REST > > client > > > do > > > > a lot of incorrect requests, spam your logs with thousands of such > > > ERRORs. > > > > The error is returned to client but it is also tee'd to log. > > > > > > > > What we could do: > > > > - Move log level from ERROR to WARN or even INFO. > > > > - Handle REST user input validation errors differently from Ignite > > > internal > > > > errors by introducing new exception class, logging it as INFO or > maybe > > > just > > > > returning to user. > > > > - Third funny option? > > > > > > > > WDYT? > > > > > > > > Regards, > > > > -- > > > > Ilya Kasnacheev > > > > > > > > > > > > > -- > > Sergey Kozlov > > GridGain Systems > > www.gridgain.com > > > > > > --000000000000469c8b057d74e8e2--