tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1326941 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/ha/session/ java/org/apache/catalina/tribes/tipis/ webapps/docs/
Date Fri, 20 Apr 2012 20:28:37 GMT
2012/4/19 Keiichi Fujino <kfujino@apache.org>:
> 2012/4/19 Konstantin Kolinko <knst.kolinko@gmail.com>:
>>
>> What happens if "repl" variable is true because of "complete" being true?
>> Shouldn't it be
>>    if (diff && (isDirty || complete))
>> ?
>>
>> I do not quite understand the code, but it seems that omitting
>> "complete" here will change its behaviour.
>>
>> E.g. DeltaSession.isDiffable() always returns true, and thus I think
>> the old "if(diff)" block was executed regardless of the value of
>> "complete".
>>
>>
>>>                 ReplicatedMapEntry rentry = (ReplicatedMapEntry)entry.getValue();
>>
>> The above local variable could be moved outside this block, to avoid
>> multiple (instanceof) checks above.
>>
>
> Thanks for the review.
> You are right. My fix had changed former behavior.
> I applied your suggestion.
> "if (diff && (isDirty || complete))" block was executed regardless of
> the value of "complete".
>

OK.
After a few days I think there is more to it:

In case when (diffable == false, complete == true, isAccess == true),
I think "complete" has to take priority over "isAccess".

I think that in that case it has to create MSG_BACKUP message. Does
that message replicate session access time?

With the current code it creates MSG_ACCESS, because isAccess is checked first.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message