From dev-return-85-archive-asf-public=cust-asf.ponee.io@dubbo.apache.org Fri Mar 9 03:34:37 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 338E518064C for ; Fri, 9 Mar 2018 03:34:37 +0100 (CET) Received: (qmail 74699 invoked by uid 500); 9 Mar 2018 02:34:35 -0000 Mailing-List: contact dev-help@dubbo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@dubbo.apache.org Delivered-To: mailing list dev@dubbo.apache.org Received: (qmail 74673 invoked by uid 99); 9 Mar 2018 02:34:34 -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; Fri, 09 Mar 2018 02:34:34 +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 8DCEEC0111 for ; Fri, 9 Mar 2018 02:34:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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 Ti6N-dAZSVrG for ; Fri, 9 Mar 2018 02:34:33 +0000 (UTC) Received: from mail-pg0-f50.google.com (mail-pg0-f50.google.com [74.125.83.50]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 507945F523 for ; Fri, 9 Mar 2018 02:34:32 +0000 (UTC) Received: by mail-pg0-f50.google.com with SMTP id g8so3025075pgv.7 for ; Thu, 08 Mar 2018 18:34:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=6QBPUT1cd0Y0+k45ibXhVBx123Jm7AP7mCzaHNAMXBI=; b=IhoCCdpO2Kht6MPVqCkx1J0KQBNBz1Uz20SmDbUdop+OpJlcqOubKspwfjwOO5cfJR 5r+djdX0pawuaPVrOJKdII7p7InEgQ7tQU6rR/lq+wPbKOopz6RnbctDeFrGfNpr6FPW y3Suurb+mFmYySXTCPbDYEn2MAjL2y5HEWvsjkGqeeb2fR2p7nAUdnvaaczGl9tPWlud 38og/nG2O61kG3Mx0xAcMrbvElmzKRRURlGG99zYSqJiOQzj3wiWtMHPQ+4oZjiebXMi KvwAlVSxekW03ewAexq2neMvOyeKhx5tvw56pc8WujewZBu8aGH7UT6B4iO2kTBFJlzB Jfgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=6QBPUT1cd0Y0+k45ibXhVBx123Jm7AP7mCzaHNAMXBI=; b=Y8P5yPU5Krpv6Who2e0vPbevLyU5X+KZ4ZFSZCPo81FMy7D38txWT7hFxiCgVGNPyV 2qV4np0BqnItD/t+ODD9xNU4UYH/mLy5APGMW05DGGRrGrBDCKJHwct+BKd+Dn9ydp0U W549ZRycrfhmNpV39WdtJlZbJs1cro5b0czxJRlDR/cJUwV01y76XXRsNlTDSDyOtoRO BtEVc4QYmVhBeu54zl7DGQcfOf+JBrsXV+iJTGzHvjsRfKwxiA+iP3LccSFgMuBLJNss Hk3c4VrFITPcJAzivz9gTbQowGW87JrefX9g6nh+XGBiRVWPcptI/qRvQ8jQA0/wxVda GZLg== X-Gm-Message-State: APf1xPD2WEH1jIWaPTNbTJBHh1S1zhh8/rDc0WhXr8xFoEOUKTAK5aR5 VqW4jgycgiL8ID+aX/E1NJYLehai X-Google-Smtp-Source: AG47ELuNtvj+ejYIPX3jUTIXtby6FkDSOfCuckBrkz/20LC4DBWT9u7z4J3OG/RX2J5LtDk/DYGFDA== X-Received: by 10.99.96.18 with SMTP id u18mr23505739pgb.124.1520562864326; Thu, 08 Mar 2018 18:34:24 -0800 (PST) Received: from [172.16.1.35] ([119.129.71.118]) by smtp.gmail.com with ESMTPSA id l12sm75818pfb.35.2018.03.08.18.34.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 18:34:23 -0800 (PST) From: kext gmail Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: Consumer side Validation SPI is wrongly activated while setting validation=true for provider Date: Fri, 9 Mar 2018 10:26:07 +0800 References: <361D05D7-E79B-4FD4-A899-0284DCCB75EA@gmail.com> To: dev@dubbo.apache.org In-Reply-To: <361D05D7-E79B-4FD4-A899-0284DCCB75EA@gmail.com> Message-Id: <80D02BC2-514A-4108-BF7D-371AC982F928@gmail.com> X-Mailer: Apple Mail (2.3445.5.20) Yes, disable default, set by user for requirement. > =D4=DA 2018=C4=EA3=D4=C28=C8=D5=A3=AC16:23=A3=ACjun liu = =D0=B4=B5=C0=A3=BA >=20 > I prefer to change the current behavior, consumer side should not be = affected in this case, if someone care about performance, they can add = validation on consumer side explicitly. >=20 > Other opinions?=20 >=20 >> On 7 Mar 2018, at 3:47 PM, Sunshow wrote: >>=20 >> Yes, that's my problem. >>=20 >> from the document, consumer can enable or disable validation itself. >>=20 >> On Wed, Mar 7, 2018 at 3:41 PM jun liu wrote: >>=20 >>> Hi Sunshow, Ian >>>=20 >>> I think i have reproduced this problem, the key point is: When we = switch >>> param validation on on provider side, all consumer projects need to = add >>> necessary dependencies explicitly (param validation was force opened = on >>> consumer side). This means provider and consumer are bind together. = Is this >>> exactly your problem, sunshow? >>>=20 >>> Should we change this behavior? >>>=20 >>>>> I think it is reasonable to check validation conditions on = consumer side >>>>> before params passed to provider side as this can be more = efficient. If >>> we >>>>> keep it this way, we will meet the problem in your case: all = consumers >>> have >>>>> to be aware of provider side validation configurations, for = example when >>>>> provider opened validation check, consumer side have to add = necessary >>>>> dependencies. >>>=20 >>>=20 >>> Best regards, >>> Jun Liu >>>=20 >>>> On 7 Mar 2018, at 2:44 PM, Ian Luo wrote: >>>>=20 >>>> Hi Sunshow, >>>>=20 >>>> Could you pls. attach a test case to reproduce the issue you = described >>>> here? I'd like to further investigate once I receive the = reproducer. >>>>=20 >>>> Thanks, >>>> -Ian. >>>>=20 >>>>=20 >>>> On Wed, Mar 7, 2018 at 2:14 PM, Sunshow wrote: >>>>=20 >>>>> ATT. >>>>>=20 >>>>> this case consumer leads to throw >>>>>=20 >>>>> Caused by: java.lang.NoClassDefFoundError: = javax/validation/Validation >>>>>=20 >>>>> even while calling no validation method, unless add all validation >>>>> dependencies to consumer, >>>>>=20 >>>>> that's not awesome, consumer side check should be activated by = consumer >>>>> self. >>>>>=20 >>>>> one more question about ValidationFilter: >>>>>=20 >>>>> why the condition check is isNotEmpty: >>>>> = ConfigUtils.isNotEmpty(invoker.getUrl().getMethodParameter(invocation. >>>>> getMethodName(), >>>>> Constants.VALIDATION_KEY)) >>>>>=20 >>>>> and previous version check true or false: >>>>> if = (invoker.getUrl().getMethodParameter(invocation.getMethodName(), >>>>> Constants.VALIDATION_KEY, false)) >>>>>=20 >>>>>=20 >>>>> Below is the reply from @ken.lj: >>>>>=20 >>>>>=20 >>>>> I think it is reasonable to check validation conditions on = consumer side >>>>> before params passed to provider side as this can be more = efficient. If >>> we >>>>> keep it this way, we will meet the problem in your case: all = consumers >>> have >>>>> to be aware of provider side validation configurations, for = example when >>>>> provider opened validation check, consumer side have to add = necessary >>>>> dependencies. >>>>>=20 >>>>> Please, send this problem to dev@dubbo.apache.org, and subscribe = to >>> this >>>>> email address . We = can >>>>> decide >>>>> which way to go after a full discussion. >>>>>=20 >>>=20 >>>=20 >=20