You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Eyal Leshem <Ey...@imperva.com> on 2016/10/07 06:17:26 UTC

Bug in the c-binding in "zoo_remove_watchers"

hi all ,


I am new in this mailing-list -

and i joined  because i think a find a bug ,  and i want to know what  is procedure for fixing it.


the bug is in the c binding - when you use  "zoo_remove_watchers" ,

and it's can cause to someone that use this function to delete other watch - and not the one he mean to delete.


The actual problem is in the function "removeWatcherFromList" -

That when we check if we need to delete the watch -  we compare the WatcherCtx to one node before the one we want to delete..


a suggested patch is attached ..


thanks a lot,

eyal


Re: Bug in the c-binding in "zoo_remove_watchers"

Posted by Raúl Gutiérrez Segalés <rg...@itevenworks.net>.
Thanks for contributing Eyal! The patches have been merged.


-rgs

On 7 October 2016 at 02:57, Flavio Junqueira <fp...@apache.org> wrote:

> Hey Eyal,
>
> Thanks for reporting this issue and producing a patch. We actually have
> some guidelines for contributing described here:
>
> https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute <
> https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute>
>
> Could you please report and provide your patch as described here?
>
> -Flavio
>
> > On 07 Oct 2016, at 07:17, Eyal Leshem <Ey...@imperva.com> wrote:
> >
> > hi all ,
> >
> > I am new in this mailing-list -
> > and i joined  because i think a find a bug ,  and i want to know what
> is procedure for fixing it.
> >
> > the bug is in the c binding - when you use  "zoo_remove_watchers" ,
> > and it's can cause to someone that use this function to delete other
> watch - and not the one he mean to delete.
> >
> > The actual problem is in the function "removeWatcherFromList" -
> > That when we check if we need to delete the watch -  we compare the
> WatcherCtx to one node before the one we want to delete..
> >
> > a suggested patch is attached ..
> >
> > thanks a lot,
> > eyal
> >
> > <zookeeper_remove_watch.patch>
>
>

Re: Bug in the c-binding in "zoo_remove_watchers"

Posted by Flavio Junqueira <fp...@apache.org>.
Hey Eyal,

Thanks for reporting this issue and producing a patch. We actually have some guidelines for contributing described here:

https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute <https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute>

Could you please report and provide your patch as described here?

-Flavio

> On 07 Oct 2016, at 07:17, Eyal Leshem <Ey...@imperva.com> wrote:
> 
> hi all , 
> 
> I am new in this mailing-list - 
> and i joined  because i think a find a bug ,  and i want to know what  is procedure for fixing it. 
> 
> the bug is in the c binding - when you use  "zoo_remove_watchers" ,
> and it's can cause to someone that use this function to delete other watch - and not the one he mean to delete.
> 
> The actual problem is in the function "removeWatcherFromList" - 
> That when we check if we need to delete the watch -  we compare the WatcherCtx to one node before the one we want to delete.. 
> 
> a suggested patch is attached .. 
> 
> thanks a lot, 
> eyal   
> 
> <zookeeper_remove_watch.patch>