[
https://issues.apache.org/jira/browse/ZOOKEEPER-2141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15217921#comment-15217921
]
Edward Ribeiro commented on ZOOKEEPER-2141:
-------------------------------------------
Hi [~adammilnesmith], I will try to check your patch today. :)
Nevertheless, I would like to step back a bit and ask you *what would be the
gain of having an equality check between two caches*? Why not get rid of the
{{equals()}} in {{ReferenceCountedACLCache}} and let the equality be handled by
the parent Object class (i.e., using the object reference)? Maybe, to make
Findbugs happy it would be rewritten as:
{code}
public synchronized equals(Object object) {
return this == object;
}
{code}
Caches are highly changing objects so I don't see any multi-threading
{{equals()}} implementation being short of complex and error prone (beside
that, two caches can be equal now and different a second later). And I question
myself if there will be a really compelling reason to check for equality
besides the test that [~fpj] pointed out. IMHO, we could also change
{{testSerializeDeserialize}} to assert the class fields to make sure the
serialization/deserialization worked fine.
Furthermore, it's class is mean to be used by {{DataTree}} only so a single
instance is okay, imho. But I am certainly missing some points here, so I would
be glad if you help me figure it out a scenario where semantic equality is
really necessary here by users of the cache.
Regards,
Eddie
> ACL cache in DataTree never removes entries
> -------------------------------------------
>
> Key: ZOOKEEPER-2141
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2141
> Project: ZooKeeper
> Issue Type: Bug
> Affects Versions: 3.4.6
> Reporter: Karol Dudzinski
> Assignee: Adam Milne-Smith
> Priority: Blocker
> Fix For: 3.4.9, 3.5.2
>
> Attachments: ZOOKEEPER-2141-3.4.patch, ZOOKEEPER-2141.patch,
> ZOOKEEPER-2141.patch, ZOOKEEPER-2141.patch, ZOOKEEPER-2141.patch,
> ZOOKEEPER-2141.patch, ZOOKEEPER-2141.patch
>
>
> The problem and potential solutions are discussed in
> http://mail-archives.apache.org/mod_mbox/zookeeper-user/201502.mbox/browser
> I will attach a proposed patch in due course.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)