i agree. that is a bug. good catch fish!  btw, we need to fix the tabs
in that function too!

ben

On Fri, Dec 23, 2011 at 4:57 AM, Flavio Junqueira <f...@yahoo-inc.com> wrote:
> Alex and I discussed it a bit offline and it seems to be bug for us. I have
> created a jira (ZOOKEEPER-1343) and I'll try to get a patch out soon.
>
> Thanks for pointing it out!
>
> -Flavio
>
> On Dec 23, 2011, at 3:59 AM, fish wrote:
>
>> Hi :
>>    I am new to the zookeeper , I have just begin to read some code of
>> zookeeper , but I don't quiet undestanding the quorm/lead.java 's
>>  getEpochToPropose method,  In this function there is a statement
>> if (lastAcceptedEpoch > epoch) {
>>   epoch = lastAcceptedEpoch+1;
>>  }
>> My doubt is :
>>  why use "lastAcceptedEpoch > epoch"  but not "lastAcceptedEpoch >=
>>  epoch" here?
>>
>> In my undestanding the lastAcceptedEpoch is the max epoch of a follower
>> may have accepted so when the lead have receive a accepted epoch from the
>> follower it should always make it's own epoch larger than this one
>> Thanks .
>
>
> flavio
> junqueira
>
> research scientist
>
> f...@yahoo-inc.com
> direct +34 93-183-8828
>
> avinguda diagonal 177, 8th floor, barcelona, 08018, es
> phone (408) 349 3300    fax (408) 349 3301
>

Reply via email to