Thank you for the reply,I will try it. 在 2013年9月7日星期六,Pieter Hintjens 写道:
> You're right. When we get a heartbeat from a worker we should also > move it to the head of the list. I think the code should call > s_worker_waiting (worker); instead of directly resetting the expiry > time. I don't have time to test that change right now -- would you > like to? > > -Pieter > > On Sat, Sep 7, 2013 at 8:44 AM, 雷达 <[email protected] <javascript:;>> > wrote: > > Excuse me,I read the book and have a question.I'm not sure if there > > is a bug in mdbroker.c? > > In method s_broker_purge,it assumes that the worker in waiting list is > > ordered by expiry.But when broker received hearbeat msg from worker, > > it only updates worker's expiry. Maybe It breaks the order of waiting > > list. > > For example,the broker receives reday msg from worker A and B,then it > > appends A,B to wating list.After a while B breaks down, and A sends > > heartbeat msg to broker. When broker receives A's heartbeat msg,it > > updates A's expiry. Now A's expiry is more recently than B. > > Is that a bug? Or I have made a mistake. Thank you very much. > > -- > > Department of Computer Science & Technology, Nanjing University > > address:306, MengMinwei Building, Hankou Road 22, Nanjing University > > Nanjing 210093, P.R.China > > _______________________________________________ > > zeromq-dev mailing list > > [email protected] <javascript:;> > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ > zeromq-dev mailing list > [email protected] <javascript:;> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- Department of Computer Science & Technology, Nanjing University address:306, MengMinwei Building, Hankou Road 22, Nanjing University Nanjing 210093, P.R.China
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
