Re: [akka-user] Re: [cluster] LeaderChanged event intermittently not sent

32 views
Skip to first unread message

√iktor Ҡlang

unread,
Jan 17, 2013, 6:24:08 PM1/17/13
to Akka User List
Are you testing against Akka master branch?

Cheers,


On Thu, Jan 17, 2013 at 11:50 PM, Jeff Simpson <jeff.s...@hungrymachine.com> wrote:
I created a new branch, potential-fix with some changes which I believe fix the issue I was seeing.  Basically I create a Future[ActorRef] and only after the LeaderChanged event is sent do I deliver the value.  This seems to allow the cluster to fully initialize.  Or I just haven't been able to reproduce since the change :)

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
 
 



--
Viktor Klang
Director of Engineering

Typesafe - The software stack for applications that scale
Twitter: @viktorklang

Jeff Simpson

unread,
Jan 17, 2013, 6:37:14 PM1/17/13
to akka...@googlegroups.com
No. I'm usimg akka 2.1 since Play is shipping with that at some point. I can try master though and report back.

Thanks
-Jeff
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

√iktor Ҡlang

unread,
Jan 17, 2013, 6:40:57 PM1/17/13
to Akka User List
On Fri, Jan 18, 2013 at 12:37 AM, Jeff Simpson <jeff.s...@livingsocial.com> wrote:
No. I'm usimg akka 2.1 since Play is shipping with that at some point. I can try master though and report back.

Please note though that master is what is going to become Akka 2.2,

Cheers,

Patrik Nordwall

unread,
Jan 18, 2013, 2:10:49 AM1/18/13
to akka...@googlegroups.com
Hi Jeff,

What I think you are missing is that you also have to use the leader information from the initial snapshot event CurrentClusterState.
If it's initially the leader it will not get any LeaderChanged, until there is another leader.

Cheers,
Patrik

Patrik Nordwall

Typesafe The software stack for applications that scale

Twitter: @patriknw

Jonas Bonér

unread,
Jan 18, 2013, 6:03:34 AM1/18/13
to akka...@googlegroups.com
On Fri, Jan 18, 2013 at 8:10 AM, Patrik Nordwall
<patrik....@gmail.com> wrote:
> Hi Jeff,
>
> What I think you are missing is that you also have to use the leader
> information from the initial snapshot event CurrentClusterState.
> If it's initially the leader it will not get any LeaderChanged, until there
> is another leader.

Is this implication of the design clearly documented?
Jonas Bonér
Phone: +46 733 777 123
Home: http://jonasboner.com
Twitter: @jboner

Jeff Simpson

unread,
Jan 18, 2013, 6:13:13 AM1/18/13
to akka...@googlegroups.com
Thanks Patrik.  That makes sense now that I think back to the logging output I was seeing.  Good to know!
--
Jeff Simpson | LivingSocial | Senior Software Engineer | 805.637.4665 | www.livingsocial.com

Patrik Nordwall

unread,
Jan 18, 2013, 6:19:37 AM1/18/13
to akka...@googlegroups.com
On Fri, Jan 18, 2013 at 12:03 PM, Jonas Bonér <jo...@jonasboner.com> wrote:
On Fri, Jan 18, 2013 at 8:10 AM, Patrik Nordwall
<patrik....@gmail.com> wrote:
> Hi Jeff,
>
> What I think you are missing is that you also have to use the leader
> information from the initial snapshot event CurrentClusterState.
> If it's initially the leader it will not get any LeaderChanged, until there
> is another leader.

Is this implication of the design clearly documented?


A snapshot of the full state,akka.cluster.ClusterEvent.CurrentClusterState, is sent to the subscriber as the first event, followed by events for incremental updates.

Jonas Bonér

unread,
Jan 18, 2013, 6:22:52 AM1/18/13
to akka...@googlegroups.com
On Fri, Jan 18, 2013 at 12:19 PM, Patrik Nordwall
<patrik....@gmail.com> wrote:
>
>
>
> On Fri, Jan 18, 2013 at 12:03 PM, Jonas Bonér <jo...@jonasboner.com> wrote:
>>
>> On Fri, Jan 18, 2013 at 8:10 AM, Patrik Nordwall
>> <patrik....@gmail.com> wrote:
>> > Hi Jeff,
>> >
>> > What I think you are missing is that you also have to use the leader
>> > information from the initial snapshot event CurrentClusterState.
>> > If it's initially the leader it will not get any LeaderChanged, until
>> > there
>> > is another leader.
>>
>> Is this implication of the design clearly documented?
>
>
> Yes,
> http://doc.akka.io/docs/akka/2.1.0/cluster/cluster-usage-scala.html#subscribe-to-cluster-events
>
> A snapshot of the full state,akka.cluster.ClusterEvent.CurrentClusterState,
> is sent to the subscriber as the first event, followed by events for
> incremental updates.
>

Great. Thanks.

Jeff Simpson

unread,
Jan 18, 2013, 6:25:56 AM1/18/13
to akka...@googlegroups.com
Thanks for all the feedback. My Akka cluster/scheduler is just about
ready for prime time!

Patrik Nordwall

unread,
Jan 18, 2013, 6:48:38 AM1/18/13
to akka...@googlegroups.com
You're welcome. Happy hAkking!
/Patrik





--
Viktor Klang
Director of Engineering

Typesafe - The software stack for applications that scale
Twitter: @viktorklang

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

--
Read the docs: http://akka.io/docs/
Check the FAQ: http://akka.io/faq/
Search the archives:
https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google
Groups
"Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to



--
Viktor Klang
Director of Engineering

Typesafe - The software stack for applications that scale
Twitter: @viktorklang

--
Read the docs: http://akka.io/docs/
Check the FAQ: http://akka.io/faq/
Search the archives:
https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google
Groups
"Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to



--

Patrik Nordwall

Typesafe -  The software stack for applications that scale
Twitter: @patriknw

--
Read the docs: http://akka.io/docs/
Check the FAQ: http://akka.io/faq/
Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google
Groups
"Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to


--
Jonas Bonér
Phone: +46 733 777 123
Home: http://jonasboner.com
Twitter: @jboner

--
      Read the docs: http://akka.io/docs/
      Check the FAQ: http://akka.io/faq/
      Search the archives:
https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups
"Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to


--

Patrik Nordwall
Typesafe -  The software stack for applications that scale
Twitter: @patriknw

--
Read the docs: http://akka.io/docs/
Check the FAQ: http://akka.io/faq/
Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups
"Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to



--
Jeff Simpson | LivingSocial | Senior Software Engineer | 805.637.4665 | www.livingsocial.com

--
     Read the docs: http://akka.io/docs/
     Check the FAQ: http://akka.io/faq/
     Search the archives: https://groups.google.com/group/akka-user
--- You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages