helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leela maheswararao <leela_mahesh...@yahoo.com>
Subject Re: External view change notifications to clients
Date Sat, 11 Nov 2017 02:11:46 GMT
 Thanks Kishore and Xue for quick reply.
Basically my scenario is like this.
Initially assume partition P1(Master) is on node N1. As part of new node addition, P1 (M)
moved to N2. It's possible that client C1still sees P1(M) on N1 due to late processing of
notification and client C2 sees P1(M) on N2 due to immediate processing of notification.
Agree that getting consensus is bit tough. One way our application client can solve this is
getting an error from server when it receives PUT/GET for partition it doesn't own and client
call below API to make an explicit Zookeeper call to get current state and invoke operation
on right server.
manager.getClusterManagmentTool().getResourceExternalView(clusterName, resourceName);
Im assuming above API makes an explicit call to ZK.
do you see any other alternative solution?
Regards,Mahesh    On Friday, November 10, 2017, 9:49:57 PM GMT+5:30, kishore g <g.kishore@gmail.com>
wrote:  
 
 lets break it into two parts. Update to ExternalView is done by the
controller. The clients are notified of the change through a Zookeeper
callback. Its not guaranteed that all clients will receive the callback at
the same time.

In general, its not a good idea to rely on every client seeing the same
view at the same time (its impossible to achieve this in a distributed
system). However, it is the view is timeline consistent. For e.g if
controller changes the external view to EV(t1), EV(t2), EV(t3) the clients
will get notified in the same order. Another thing you should be aware is
that if these changes happen in quick succession, its possible that the
client only sees EV(t1) and EV(t3).

Can you provide more details on what you are planning to achieve. We can
suggest the right design.


On Fri, Nov 10, 2017 at 4:05 AM, Xue Junkai <junkai.xue@gmail.com> wrote:

> If you attach the external view listener through HelixManager, all the
> listener will be notified at same time.
>
> On Fri, Nov 10, 2017 at 4:02 AM, leela maheswararao <
> leela_maheshwar@yahoo.com.invalid> wrote:
>
> > Team,Does helix ensure whether all clients see same external view at same
> > time ? Or application should handle this?
> >
> > Regards,Mahesh
>
>
>
>
> --
> Junkai Xue
>
  
Mime
View raw message