You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by Zonghai Shang <yi...@apache.org> on 2018/11/01 12:58:33 UTC

Fix disable provider does’t work.

Hi,

I found that the dubbo service was still called after it was disabled. I
analyzed and fixed this problem.

This is my pull request:
https://github.com/apache/incubator-dubbo/pull/2729

Please help me check again, thanks.

-yiji

Re: Fix disable provider does’t work.

Posted by Zonghai Shang <yi...@apache.org>.
nice

yiji

yuhang xiu <ca...@gmail.com> 于2018年11月5日周一 上午11:43写道:

> Hi
>
> I add related issue which is listed in dubbo issue list in the comment.
> Seems like disable provider also has sth wrong when a provider is in group.
>
> Zonghai Shang <yi...@apache.org> 于2018年11月5日周一 上午11:15写道:
>
> > Hi,
> >
> > sure, done
> >
> > new issue: https://github.com/apache/incubator-dubbo-ops/issues/177
> >
> > yiji
> >
> > Ian Luo <ia...@gmail.com> 于2018年11月5日周一 上午10:33写道:
> >
> > > Yiji,
> > >
> > > Would you mind to fire one issue on dubbo-ops, and close the original
> > one?
> > >
> > > Thanks,
> > > -Ian.
> > >
> > >
> > > On Fri, Nov 2, 2018 at 5:07 PM Zonghai Shang <yi...@apache.org> wrote:
> > >
> > > > Hi,
> > > >
> > > > Dubbo-ops should control 2 scenes cannot be disabled:
> > > >
> > > > 1. All providers disabled
> > > > 2. Only 1 service provider
> > > >
> > > > yiji
> > > >
> > > > Zonghai Shang <yi...@apache.org> 于2018年11月2日周五 下午4:20写道:
> > > >
> > > > > Hi,
> > > > >
> > > > > > if the registry center pushes an empty address list to the
> > consumer,
> > > it
> > > > > is very likely a mistake
> > > > >
> > > > > I understand your concerns, generally push the empty list only 2
> > cases:
> > > > > 1. There are no providers
> > > > > 2. Registration Center bug (but not very likely)
> > > > >
> > > > > I think that the service provider can't disable it and need to pay
> > > > > attention to it.
> > > > >
> > > > > This pr I am temporarily closed.
> > > > >
> > > > > -yiji
> > > > >
> > > > > Ian Luo <ia...@gmail.com> 于2018年11月2日周五 下午3:14写道:
> > > > >
> > > > >> Yiji,
> > > > >>
> > > > >> I checked the code but I am afraid I cannot agree with your
> proposed
> > > > >> change. I agree with Jun's comments that this is a deliberate
> > design.
> > > In
> > > > >> fact it is a simple empty-protection strategy. Image this, if the
> > > > registry
> > > > >> center pushes an empty address list to the consumer, it is very
> > > likely a
> > > > >> mistake. In this case, we should keep the old address list and
> > ignore
> > > > new.
> > > > >> And the code you touched in RegistryDirectory is a protection for
> > > exact
> > > > >> this scenario.
> > > > >>
> > > > >> Regards,
> > > > >> -Ian.
> > > > >>
> > > > >>
> > > > >> On Fri, Nov 2, 2018 at 12:38 PM Zonghai Shang <yi...@apache.org>
> > > wrote:
> > > > >>
> > > > >> > Hi,
> > > > >> >
> > > > >> > > Isn’t that a protective mechanism Dubbo deliberately made? For
> > > > >> example,
> > > > >> > to protect a `disable=true` policy from working if it disables
> the
> > > > last
> > > > >> > provider that’s available.
> > > > >> >
> > > > >> > If the user wants to call it can be prohibited, Similarly, if
> the
> > > user
> > > > >> > explicitly disables, the call should be disabled.
> > > > >> >
> > > > >> > > Will this problem happen when explicitly offline or unregister
> > all
> > > > >> > provider from the registry?
> > > > >> >
> > > > >> > The main scenario here is the scenario where the override policy
> > is
> > > > >> sent.
> > > > >> > Override polocy has restricted all providers(> 1, ip: 0.0.0.0)
> > from
> > > > >> being
> > > > >> > disabled.
> > > > >> >
> > > > >> > -yiji
> > > > >> >
> > > > >> > jun liu <ke...@gmail.com> 于2018年11月2日周五 上午11:44写道:
> > > > >> >
> > > > >> > > Isn’t that a protective mechanism Dubbo deliberately made? For
> > > > >> example,
> > > > >> > to
> > > > >> > > protect a `disable=true` policy from working if it disables
> the
> > > last
> > > > >> > > provider that’s available.
> > > > >> > >
> > > > >> > > Will this problem happen when explicitly offline or unregister
> > all
> > > > >> > > provider from the registry?
> > > > >> > >
> > > > >> > > I will dive into the code later.
> > > > >> > >
> > > > >> > > Best regards,
> > > > >> > > Jun
> > > > >> > >
> > > > >> > > > On Nov 1, 2018, at 8:58 PM, Zonghai Shang <yi...@apache.org>
> > > > wrote:
> > > > >> > > >
> > > > >> > > > Hi,
> > > > >> > > >
> > > > >> > > > I found that the dubbo service was still called after it was
> > > > >> disabled.
> > > > >> > I
> > > > >> > > > analyzed and fixed this problem.
> > > > >> > > >
> > > > >> > > > This is my pull request:
> > > > >> > > > https://github.com/apache/incubator-dubbo/pull/2729
> > > > >> > > >
> > > > >> > > > Please help me check again, thanks.
> > > > >> > > >
> > > > >> > > > -yiji
> > > > >> > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > > >
> > > >
> > >
> >
>

Re: Fix disable provider does’t work.

Posted by yuhang xiu <ca...@gmail.com>.
Hi

I add related issue which is listed in dubbo issue list in the comment.
Seems like disable provider also has sth wrong when a provider is in group.

Zonghai Shang <yi...@apache.org> 于2018年11月5日周一 上午11:15写道:

> Hi,
>
> sure, done
>
> new issue: https://github.com/apache/incubator-dubbo-ops/issues/177
>
> yiji
>
> Ian Luo <ia...@gmail.com> 于2018年11月5日周一 上午10:33写道:
>
> > Yiji,
> >
> > Would you mind to fire one issue on dubbo-ops, and close the original
> one?
> >
> > Thanks,
> > -Ian.
> >
> >
> > On Fri, Nov 2, 2018 at 5:07 PM Zonghai Shang <yi...@apache.org> wrote:
> >
> > > Hi,
> > >
> > > Dubbo-ops should control 2 scenes cannot be disabled:
> > >
> > > 1. All providers disabled
> > > 2. Only 1 service provider
> > >
> > > yiji
> > >
> > > Zonghai Shang <yi...@apache.org> 于2018年11月2日周五 下午4:20写道:
> > >
> > > > Hi,
> > > >
> > > > > if the registry center pushes an empty address list to the
> consumer,
> > it
> > > > is very likely a mistake
> > > >
> > > > I understand your concerns, generally push the empty list only 2
> cases:
> > > > 1. There are no providers
> > > > 2. Registration Center bug (but not very likely)
> > > >
> > > > I think that the service provider can't disable it and need to pay
> > > > attention to it.
> > > >
> > > > This pr I am temporarily closed.
> > > >
> > > > -yiji
> > > >
> > > > Ian Luo <ia...@gmail.com> 于2018年11月2日周五 下午3:14写道:
> > > >
> > > >> Yiji,
> > > >>
> > > >> I checked the code but I am afraid I cannot agree with your proposed
> > > >> change. I agree with Jun's comments that this is a deliberate
> design.
> > In
> > > >> fact it is a simple empty-protection strategy. Image this, if the
> > > registry
> > > >> center pushes an empty address list to the consumer, it is very
> > likely a
> > > >> mistake. In this case, we should keep the old address list and
> ignore
> > > new.
> > > >> And the code you touched in RegistryDirectory is a protection for
> > exact
> > > >> this scenario.
> > > >>
> > > >> Regards,
> > > >> -Ian.
> > > >>
> > > >>
> > > >> On Fri, Nov 2, 2018 at 12:38 PM Zonghai Shang <yi...@apache.org>
> > wrote:
> > > >>
> > > >> > Hi,
> > > >> >
> > > >> > > Isn’t that a protective mechanism Dubbo deliberately made? For
> > > >> example,
> > > >> > to protect a `disable=true` policy from working if it disables the
> > > last
> > > >> > provider that’s available.
> > > >> >
> > > >> > If the user wants to call it can be prohibited, Similarly, if the
> > user
> > > >> > explicitly disables, the call should be disabled.
> > > >> >
> > > >> > > Will this problem happen when explicitly offline or unregister
> all
> > > >> > provider from the registry?
> > > >> >
> > > >> > The main scenario here is the scenario where the override policy
> is
> > > >> sent.
> > > >> > Override polocy has restricted all providers(> 1, ip: 0.0.0.0)
> from
> > > >> being
> > > >> > disabled.
> > > >> >
> > > >> > -yiji
> > > >> >
> > > >> > jun liu <ke...@gmail.com> 于2018年11月2日周五 上午11:44写道:
> > > >> >
> > > >> > > Isn’t that a protective mechanism Dubbo deliberately made? For
> > > >> example,
> > > >> > to
> > > >> > > protect a `disable=true` policy from working if it disables the
> > last
> > > >> > > provider that’s available.
> > > >> > >
> > > >> > > Will this problem happen when explicitly offline or unregister
> all
> > > >> > > provider from the registry?
> > > >> > >
> > > >> > > I will dive into the code later.
> > > >> > >
> > > >> > > Best regards,
> > > >> > > Jun
> > > >> > >
> > > >> > > > On Nov 1, 2018, at 8:58 PM, Zonghai Shang <yi...@apache.org>
> > > wrote:
> > > >> > > >
> > > >> > > > Hi,
> > > >> > > >
> > > >> > > > I found that the dubbo service was still called after it was
> > > >> disabled.
> > > >> > I
> > > >> > > > analyzed and fixed this problem.
> > > >> > > >
> > > >> > > > This is my pull request:
> > > >> > > > https://github.com/apache/incubator-dubbo/pull/2729
> > > >> > > >
> > > >> > > > Please help me check again, thanks.
> > > >> > > >
> > > >> > > > -yiji
> > > >> > >
> > > >> > >
> > > >> >
> > > >>
> > > >
> > >
> >
>

Re: Fix disable provider does’t work.

Posted by Zonghai Shang <yi...@apache.org>.
Hi,

sure, done

new issue: https://github.com/apache/incubator-dubbo-ops/issues/177

yiji

Ian Luo <ia...@gmail.com> 于2018年11月5日周一 上午10:33写道:

> Yiji,
>
> Would you mind to fire one issue on dubbo-ops, and close the original one?
>
> Thanks,
> -Ian.
>
>
> On Fri, Nov 2, 2018 at 5:07 PM Zonghai Shang <yi...@apache.org> wrote:
>
> > Hi,
> >
> > Dubbo-ops should control 2 scenes cannot be disabled:
> >
> > 1. All providers disabled
> > 2. Only 1 service provider
> >
> > yiji
> >
> > Zonghai Shang <yi...@apache.org> 于2018年11月2日周五 下午4:20写道:
> >
> > > Hi,
> > >
> > > > if the registry center pushes an empty address list to the consumer,
> it
> > > is very likely a mistake
> > >
> > > I understand your concerns, generally push the empty list only 2 cases:
> > > 1. There are no providers
> > > 2. Registration Center bug (but not very likely)
> > >
> > > I think that the service provider can't disable it and need to pay
> > > attention to it.
> > >
> > > This pr I am temporarily closed.
> > >
> > > -yiji
> > >
> > > Ian Luo <ia...@gmail.com> 于2018年11月2日周五 下午3:14写道:
> > >
> > >> Yiji,
> > >>
> > >> I checked the code but I am afraid I cannot agree with your proposed
> > >> change. I agree with Jun's comments that this is a deliberate design.
> In
> > >> fact it is a simple empty-protection strategy. Image this, if the
> > registry
> > >> center pushes an empty address list to the consumer, it is very
> likely a
> > >> mistake. In this case, we should keep the old address list and ignore
> > new.
> > >> And the code you touched in RegistryDirectory is a protection for
> exact
> > >> this scenario.
> > >>
> > >> Regards,
> > >> -Ian.
> > >>
> > >>
> > >> On Fri, Nov 2, 2018 at 12:38 PM Zonghai Shang <yi...@apache.org>
> wrote:
> > >>
> > >> > Hi,
> > >> >
> > >> > > Isn’t that a protective mechanism Dubbo deliberately made? For
> > >> example,
> > >> > to protect a `disable=true` policy from working if it disables the
> > last
> > >> > provider that’s available.
> > >> >
> > >> > If the user wants to call it can be prohibited, Similarly, if the
> user
> > >> > explicitly disables, the call should be disabled.
> > >> >
> > >> > > Will this problem happen when explicitly offline or unregister all
> > >> > provider from the registry?
> > >> >
> > >> > The main scenario here is the scenario where the override policy is
> > >> sent.
> > >> > Override polocy has restricted all providers(> 1, ip: 0.0.0.0) from
> > >> being
> > >> > disabled.
> > >> >
> > >> > -yiji
> > >> >
> > >> > jun liu <ke...@gmail.com> 于2018年11月2日周五 上午11:44写道:
> > >> >
> > >> > > Isn’t that a protective mechanism Dubbo deliberately made? For
> > >> example,
> > >> > to
> > >> > > protect a `disable=true` policy from working if it disables the
> last
> > >> > > provider that’s available.
> > >> > >
> > >> > > Will this problem happen when explicitly offline or unregister all
> > >> > > provider from the registry?
> > >> > >
> > >> > > I will dive into the code later.
> > >> > >
> > >> > > Best regards,
> > >> > > Jun
> > >> > >
> > >> > > > On Nov 1, 2018, at 8:58 PM, Zonghai Shang <yi...@apache.org>
> > wrote:
> > >> > > >
> > >> > > > Hi,
> > >> > > >
> > >> > > > I found that the dubbo service was still called after it was
> > >> disabled.
> > >> > I
> > >> > > > analyzed and fixed this problem.
> > >> > > >
> > >> > > > This is my pull request:
> > >> > > > https://github.com/apache/incubator-dubbo/pull/2729
> > >> > > >
> > >> > > > Please help me check again, thanks.
> > >> > > >
> > >> > > > -yiji
> > >> > >
> > >> > >
> > >> >
> > >>
> > >
> >
>

Re: Fix disable provider does’t work.

Posted by Ian Luo <ia...@gmail.com>.
Yiji,

Would you mind to fire one issue on dubbo-ops, and close the original one?

Thanks,
-Ian.


On Fri, Nov 2, 2018 at 5:07 PM Zonghai Shang <yi...@apache.org> wrote:

> Hi,
>
> Dubbo-ops should control 2 scenes cannot be disabled:
>
> 1. All providers disabled
> 2. Only 1 service provider
>
> yiji
>
> Zonghai Shang <yi...@apache.org> 于2018年11月2日周五 下午4:20写道:
>
> > Hi,
> >
> > > if the registry center pushes an empty address list to the consumer, it
> > is very likely a mistake
> >
> > I understand your concerns, generally push the empty list only 2 cases:
> > 1. There are no providers
> > 2. Registration Center bug (but not very likely)
> >
> > I think that the service provider can't disable it and need to pay
> > attention to it.
> >
> > This pr I am temporarily closed.
> >
> > -yiji
> >
> > Ian Luo <ia...@gmail.com> 于2018年11月2日周五 下午3:14写道:
> >
> >> Yiji,
> >>
> >> I checked the code but I am afraid I cannot agree with your proposed
> >> change. I agree with Jun's comments that this is a deliberate design. In
> >> fact it is a simple empty-protection strategy. Image this, if the
> registry
> >> center pushes an empty address list to the consumer, it is very likely a
> >> mistake. In this case, we should keep the old address list and ignore
> new.
> >> And the code you touched in RegistryDirectory is a protection for exact
> >> this scenario.
> >>
> >> Regards,
> >> -Ian.
> >>
> >>
> >> On Fri, Nov 2, 2018 at 12:38 PM Zonghai Shang <yi...@apache.org> wrote:
> >>
> >> > Hi,
> >> >
> >> > > Isn’t that a protective mechanism Dubbo deliberately made? For
> >> example,
> >> > to protect a `disable=true` policy from working if it disables the
> last
> >> > provider that’s available.
> >> >
> >> > If the user wants to call it can be prohibited, Similarly, if the user
> >> > explicitly disables, the call should be disabled.
> >> >
> >> > > Will this problem happen when explicitly offline or unregister all
> >> > provider from the registry?
> >> >
> >> > The main scenario here is the scenario where the override policy is
> >> sent.
> >> > Override polocy has restricted all providers(> 1, ip: 0.0.0.0) from
> >> being
> >> > disabled.
> >> >
> >> > -yiji
> >> >
> >> > jun liu <ke...@gmail.com> 于2018年11月2日周五 上午11:44写道:
> >> >
> >> > > Isn’t that a protective mechanism Dubbo deliberately made? For
> >> example,
> >> > to
> >> > > protect a `disable=true` policy from working if it disables the last
> >> > > provider that’s available.
> >> > >
> >> > > Will this problem happen when explicitly offline or unregister all
> >> > > provider from the registry?
> >> > >
> >> > > I will dive into the code later.
> >> > >
> >> > > Best regards,
> >> > > Jun
> >> > >
> >> > > > On Nov 1, 2018, at 8:58 PM, Zonghai Shang <yi...@apache.org>
> wrote:
> >> > > >
> >> > > > Hi,
> >> > > >
> >> > > > I found that the dubbo service was still called after it was
> >> disabled.
> >> > I
> >> > > > analyzed and fixed this problem.
> >> > > >
> >> > > > This is my pull request:
> >> > > > https://github.com/apache/incubator-dubbo/pull/2729
> >> > > >
> >> > > > Please help me check again, thanks.
> >> > > >
> >> > > > -yiji
> >> > >
> >> > >
> >> >
> >>
> >
>

Re: Fix disable provider does’t work.

Posted by Zonghai Shang <yi...@apache.org>.
Hi,

Dubbo-ops should control 2 scenes cannot be disabled:

1. All providers disabled
2. Only 1 service provider

yiji

Zonghai Shang <yi...@apache.org> 于2018年11月2日周五 下午4:20写道:

> Hi,
>
> > if the registry center pushes an empty address list to the consumer, it
> is very likely a mistake
>
> I understand your concerns, generally push the empty list only 2 cases:
> 1. There are no providers
> 2. Registration Center bug (but not very likely)
>
> I think that the service provider can't disable it and need to pay
> attention to it.
>
> This pr I am temporarily closed.
>
> -yiji
>
> Ian Luo <ia...@gmail.com> 于2018年11月2日周五 下午3:14写道:
>
>> Yiji,
>>
>> I checked the code but I am afraid I cannot agree with your proposed
>> change. I agree with Jun's comments that this is a deliberate design. In
>> fact it is a simple empty-protection strategy. Image this, if the registry
>> center pushes an empty address list to the consumer, it is very likely a
>> mistake. In this case, we should keep the old address list and ignore new.
>> And the code you touched in RegistryDirectory is a protection for exact
>> this scenario.
>>
>> Regards,
>> -Ian.
>>
>>
>> On Fri, Nov 2, 2018 at 12:38 PM Zonghai Shang <yi...@apache.org> wrote:
>>
>> > Hi,
>> >
>> > > Isn’t that a protective mechanism Dubbo deliberately made? For
>> example,
>> > to protect a `disable=true` policy from working if it disables the last
>> > provider that’s available.
>> >
>> > If the user wants to call it can be prohibited, Similarly, if the user
>> > explicitly disables, the call should be disabled.
>> >
>> > > Will this problem happen when explicitly offline or unregister all
>> > provider from the registry?
>> >
>> > The main scenario here is the scenario where the override policy is
>> sent.
>> > Override polocy has restricted all providers(> 1, ip: 0.0.0.0) from
>> being
>> > disabled.
>> >
>> > -yiji
>> >
>> > jun liu <ke...@gmail.com> 于2018年11月2日周五 上午11:44写道:
>> >
>> > > Isn’t that a protective mechanism Dubbo deliberately made? For
>> example,
>> > to
>> > > protect a `disable=true` policy from working if it disables the last
>> > > provider that’s available.
>> > >
>> > > Will this problem happen when explicitly offline or unregister all
>> > > provider from the registry?
>> > >
>> > > I will dive into the code later.
>> > >
>> > > Best regards,
>> > > Jun
>> > >
>> > > > On Nov 1, 2018, at 8:58 PM, Zonghai Shang <yi...@apache.org> wrote:
>> > > >
>> > > > Hi,
>> > > >
>> > > > I found that the dubbo service was still called after it was
>> disabled.
>> > I
>> > > > analyzed and fixed this problem.
>> > > >
>> > > > This is my pull request:
>> > > > https://github.com/apache/incubator-dubbo/pull/2729
>> > > >
>> > > > Please help me check again, thanks.
>> > > >
>> > > > -yiji
>> > >
>> > >
>> >
>>
>

Re: Fix disable provider does’t work.

Posted by Zonghai Shang <yi...@apache.org>.
Hi,

> if the registry center pushes an empty address list to the consumer, it
is very likely a mistake

I understand your concerns, generally push the empty list only 2 cases:
1. There are no providers
2. Registration Center bug (but not very likely)

I think that the service provider can't disable it and need to pay
attention to it.

This pr I am temporarily closed.

-yiji

Ian Luo <ia...@gmail.com> 于2018年11月2日周五 下午3:14写道:

> Yiji,
>
> I checked the code but I am afraid I cannot agree with your proposed
> change. I agree with Jun's comments that this is a deliberate design. In
> fact it is a simple empty-protection strategy. Image this, if the registry
> center pushes an empty address list to the consumer, it is very likely a
> mistake. In this case, we should keep the old address list and ignore new.
> And the code you touched in RegistryDirectory is a protection for exact
> this scenario.
>
> Regards,
> -Ian.
>
>
> On Fri, Nov 2, 2018 at 12:38 PM Zonghai Shang <yi...@apache.org> wrote:
>
> > Hi,
> >
> > > Isn’t that a protective mechanism Dubbo deliberately made? For example,
> > to protect a `disable=true` policy from working if it disables the last
> > provider that’s available.
> >
> > If the user wants to call it can be prohibited, Similarly, if the user
> > explicitly disables, the call should be disabled.
> >
> > > Will this problem happen when explicitly offline or unregister all
> > provider from the registry?
> >
> > The main scenario here is the scenario where the override policy is sent.
> > Override polocy has restricted all providers(> 1, ip: 0.0.0.0) from being
> > disabled.
> >
> > -yiji
> >
> > jun liu <ke...@gmail.com> 于2018年11月2日周五 上午11:44写道:
> >
> > > Isn’t that a protective mechanism Dubbo deliberately made? For example,
> > to
> > > protect a `disable=true` policy from working if it disables the last
> > > provider that’s available.
> > >
> > > Will this problem happen when explicitly offline or unregister all
> > > provider from the registry?
> > >
> > > I will dive into the code later.
> > >
> > > Best regards,
> > > Jun
> > >
> > > > On Nov 1, 2018, at 8:58 PM, Zonghai Shang <yi...@apache.org> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I found that the dubbo service was still called after it was
> disabled.
> > I
> > > > analyzed and fixed this problem.
> > > >
> > > > This is my pull request:
> > > > https://github.com/apache/incubator-dubbo/pull/2729
> > > >
> > > > Please help me check again, thanks.
> > > >
> > > > -yiji
> > >
> > >
> >
>

Re: Fix disable provider does’t work.

Posted by Ian Luo <ia...@gmail.com>.
Yiji,

I checked the code but I am afraid I cannot agree with your proposed
change. I agree with Jun's comments that this is a deliberate design. In
fact it is a simple empty-protection strategy. Image this, if the registry
center pushes an empty address list to the consumer, it is very likely a
mistake. In this case, we should keep the old address list and ignore new.
And the code you touched in RegistryDirectory is a protection for exact
this scenario.

Regards,
-Ian.


On Fri, Nov 2, 2018 at 12:38 PM Zonghai Shang <yi...@apache.org> wrote:

> Hi,
>
> > Isn’t that a protective mechanism Dubbo deliberately made? For example,
> to protect a `disable=true` policy from working if it disables the last
> provider that’s available.
>
> If the user wants to call it can be prohibited, Similarly, if the user
> explicitly disables, the call should be disabled.
>
> > Will this problem happen when explicitly offline or unregister all
> provider from the registry?
>
> The main scenario here is the scenario where the override policy is sent.
> Override polocy has restricted all providers(> 1, ip: 0.0.0.0) from being
> disabled.
>
> -yiji
>
> jun liu <ke...@gmail.com> 于2018年11月2日周五 上午11:44写道:
>
> > Isn’t that a protective mechanism Dubbo deliberately made? For example,
> to
> > protect a `disable=true` policy from working if it disables the last
> > provider that’s available.
> >
> > Will this problem happen when explicitly offline or unregister all
> > provider from the registry?
> >
> > I will dive into the code later.
> >
> > Best regards,
> > Jun
> >
> > > On Nov 1, 2018, at 8:58 PM, Zonghai Shang <yi...@apache.org> wrote:
> > >
> > > Hi,
> > >
> > > I found that the dubbo service was still called after it was disabled.
> I
> > > analyzed and fixed this problem.
> > >
> > > This is my pull request:
> > > https://github.com/apache/incubator-dubbo/pull/2729
> > >
> > > Please help me check again, thanks.
> > >
> > > -yiji
> >
> >
>

Re: Fix disable provider does’t work.

Posted by Zonghai Shang <yi...@apache.org>.
Hi,

> Isn’t that a protective mechanism Dubbo deliberately made? For example,
to protect a `disable=true` policy from working if it disables the last
provider that’s available.

If the user wants to call it can be prohibited, Similarly, if the user
explicitly disables, the call should be disabled.

> Will this problem happen when explicitly offline or unregister all
provider from the registry?

The main scenario here is the scenario where the override policy is sent.
Override polocy has restricted all providers(> 1, ip: 0.0.0.0) from being
disabled.

-yiji

jun liu <ke...@gmail.com> 于2018年11月2日周五 上午11:44写道:

> Isn’t that a protective mechanism Dubbo deliberately made? For example, to
> protect a `disable=true` policy from working if it disables the last
> provider that’s available.
>
> Will this problem happen when explicitly offline or unregister all
> provider from the registry?
>
> I will dive into the code later.
>
> Best regards,
> Jun
>
> > On Nov 1, 2018, at 8:58 PM, Zonghai Shang <yi...@apache.org> wrote:
> >
> > Hi,
> >
> > I found that the dubbo service was still called after it was disabled. I
> > analyzed and fixed this problem.
> >
> > This is my pull request:
> > https://github.com/apache/incubator-dubbo/pull/2729
> >
> > Please help me check again, thanks.
> >
> > -yiji
>
>

Re: Fix disable provider does’t work.

Posted by jun liu <ke...@gmail.com>.
Isn’t that a protective mechanism Dubbo deliberately made? For example, to protect a `disable=true` policy from working if it disables the last provider that’s available.

Will this problem happen when explicitly offline or unregister all provider from the registry?

I will dive into the code later. 

Best regards,
Jun

> On Nov 1, 2018, at 8:58 PM, Zonghai Shang <yi...@apache.org> wrote:
> 
> Hi,
> 
> I found that the dubbo service was still called after it was disabled. I
> analyzed and fixed this problem.
> 
> This is my pull request:
> https://github.com/apache/incubator-dubbo/pull/2729
> 
> Please help me check again, thanks.
> 
> -yiji