You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consumer side Validation SPI is wrongly activated while setting validation=true for provider #1386
even while calling no validation method, unless add all validation dependencies to consumer,
that's not awesome.
one more question about ValidationFilter:
why the condition check is isNotEmpty: ConfigUtils.isNotEmpty(invoker.getUrl().getMethodParameter(invocation.getMethodName(), Constants.VALIDATION_KEY))
and previous version check true or false: if (invoker.getUrl().getMethodParameter(invocation.getMethodName(), Constants.VALIDATION_KEY, false))
even while calling no validation method, unless add all validation dependencies to consumer,
that's not awesome.
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.
Activity
beiwei30 commentedon Mar 5, 2018
@Sunshow can you provide a small sample to demo how to reproduce?
chickenlj commentedon Mar 6, 2018
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.
Please, send this problem to [email protected], and subscribe to this email address. We can decide which way to go after a full discussion.
Sunshow commentedon Mar 7, 2018
@chickenlj
thanks, just sent the mail.
chickenlj commentedon May 23, 2018
@nzomkxia I think your suggestion works, would you please submit a pull request?
https://github.com/apache/incubator-dubbo/blob/300f9c9fe1e4de8f14b494d8bf835b4e1ac6d5d6/dubbo-registry/dubbo-registry-api/src/main/java/com/alibaba/dubbo/registry/integration/RegistryProtocol.java#L230
Merge pull request apache#1839, remove validation key from provider u…
fix default setting (#4955)