From dev-return-43647-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Thu Dec 20 15:34:12 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 587E0180648 for ; Thu, 20 Dec 2018 15:34:11 +0100 (CET) Received: (qmail 33044 invoked by uid 500); 20 Dec 2018 14:34:10 -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 33031 invoked by uid 99); 20 Dec 2018 14:34:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2018 14:34:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 50763C84A7 for ; Thu, 20 Dec 2018 14:34:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.799 X-Spam-Level: ** X-Spam-Status: No, score=2.799 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, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id U2O2EadOjdLs for ; Thu, 20 Dec 2018 14:34:07 +0000 (UTC) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 662215FDD2 for ; Thu, 20 Dec 2018 14:26:40 +0000 (UTC) Received: by mail-lf1-f53.google.com with SMTP id p6so1515345lfc.1 for ; Thu, 20 Dec 2018 06:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:mime-version:to:from:subject:date:importance:in-reply-to :references; bh=w955wRFYS4b8H6P+VKzZO9tpNo/s85osNDmICzzRIgA=; b=MjLXUqYyb2bkoPpO+smIYKfOMGbBA//6vXR7elVEYcuE2oG+2aDDAOu/qsWANDhRRD Dzv2ZFEwB8WrS5czoubqUGsmpVQsJPWiU0Hi6+9xwPyelDmKmcO4wDEuQWQ4ziZBCxRH XtDcq53uvLsQW64I6ZC8zrWbpdg6xSER2ZDsD5eF+/b8oDVw27GsAwXK/OrnJEfEr8b4 tnaUplhYLQKBcci7wOyzbgRN178EogxZjdoRWbiyOhnGzSZSTOCSyeGmGTlwG6SsXNYL ajVhbgv0sJ8WwkAfYycoO9Eiz+vW05p01Dtw1mninLW0eIzz26mIYZy+1gGXIoBom7bw BHFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version:to:from:subject:date :importance:in-reply-to:references; bh=w955wRFYS4b8H6P+VKzZO9tpNo/s85osNDmICzzRIgA=; b=hB5QrCfdFV9KUCQd9gGWnre8XA9w9SorGSaFCXKXT+ys0Ja5qc+CImqAx+HMcF9ONk qsUUkAv8tlOKBmdDFQpHB9g1rkRSn6rhQZ0G/trrZHyDIJh7cj9v42G0vIkROPwnNpkK nxOBFi3ExAUgBcp5e50iBbFCKVRNEEU9QpdU1vQc3gXfoxNWQJ8blBmSRx/mplwheToc Wgy6ecDM8kpdiiGJCpRqJRKAEp4SMjET3BteFtsM2eUec0N+4GpWNGQVxS/cODTQ2kMy wk5GGX3DUF2linFxyvFm9ca18YCA+LFi790wqFzJGneIBhsI7L15VftiZp589GPTAtX6 P5dQ== X-Gm-Message-State: AA+aEWaxzgp6Da2uxpKMdfdFVflDqFRZdPl4YaTAK21jy2Sd22WpuEmw yKwkMVOC82IuZIuCYO2t9lQKiT7D X-Google-Smtp-Source: AFSGD/XeKwmoFy5xQIPDqILWSQF4QqE9wip+1zOlEhZzMPbeWek8MKbFuPrcVr4UYyfPlEWIHY4CLA== X-Received: by 2002:a19:2b54:: with SMTP id r81mr16044568lfr.34.1545315993477; Thu, 20 Dec 2018 06:26:33 -0800 (PST) Received: from ?IPv6:::ffff:172.25.4.36? ([195.239.208.174]) by smtp.gmail.com with ESMTPSA id f20-v6sm3999651ljk.33.2018.12.20.06.26.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 06:26:32 -0800 (PST) Message-ID: <5c1ba698.1c69fb81.a7aed.a216@mx.google.com> MIME-Version: 1.0 To: "dev@ignite.apache.org" From: Stanislav Lukyanov Subject: RE: REST GridCacheCommandHandler writes ERROR in log in caseofbaduser input Date: Thu, 20 Dec 2018 17:26:33 +0300 Importance: normal X-Priority: 3 In-Reply-To: <5c1ba52d.1c69fb81.4e674.bddf@mx.google.com> References: <5c1b951a.1c69fb81.507fe.a64a@mx.google.com> <5c1ba52d.1c69fb81.4e674.bddf@mx.google.com> Content-Type: multipart/alternative; boundary="_4C97F645-EEC7-451D-92C0-859AA2EC4646_" --_4C97F645-EEC7-451D-92C0-859AA2EC4646_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" More food for thought - here are JCL guidelines that look close to what I= =E2=80=99ve suggested: http://commons.apache.org/proper/commons-logging/guide.html#JCL_Best_Practi= ces Big thanks to Oleg Ignatenko for the pointer. Thanks, Stan=20 From: Stanislav Lukyanov Sent: 20 =D0=B4=D0=B5=D0=BA=D0=B0=D0=B1=D1=80=D1=8F 2018 =D0=B3. 17:20 To: dev@ignite.apache.org Subject: RE: REST GridCacheCommandHandler writes ERROR in log in caseofbadu= ser input I think that the error detected in the server=E2=80=99s SQL engine is INFO = 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 a= nd 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 ofbad= user input Hello! Where should user-specified SQL errors and REST call parameter errors fall in this scheme? Regards, --=20 Ilya Kasnacheev =D1=87=D1=82, 20 =D0=B4=D0=B5=D0=BA. 2018 =D0=B3. =D0=B2 16:12, Stanislav L= ukyanov : > +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/cluste= r 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 wrong = =E2=80=93 cluster > stability and/or data integrity could be in danger; we can=E2=80=99t veri= fy 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 whic= h 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 but= 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 debugg= ing which > probably wouldn=E2=80=99t help anyone but Ignite developers; can produce = 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 of > 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 broken. > 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 requi= re > throw the exception on nodes. > From the that standpoint the WARNING or even DEBUG is most suitable level > to report such issues. Same approach may be used more widely for instance > 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 to > > missing parameters. That's, in fact, an exception/error. What needs to = be > > changed is texts of messages so that everyone understands what exactly > > 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 Apache > > > Ignite. > > > > > > If you send a REST command with error in it (such as missing "keys" f= or > > > 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 an= d > > > severe errors in application code as opposed to user input validation > > > 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 mayb= e > > just > > > returning to user. > > > - Third funny option? > > > > > > WDYT? > > > > > > Regards, > > > -- > > > Ilya Kasnacheev > > > > > > > > -- > Sergey Kozlov > GridGain Systems > www.gridgain.com > > --_4C97F645-EEC7-451D-92C0-859AA2EC4646_--