2012/4/19 Keiichi Fujino <kfuj...@apache.org>: > 2012/4/19 Konstantin Kolinko <knst.koli...@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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org