[
https://issues.apache.org/jira/browse/ZOOKEEPER-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137549#comment-13137549
]
Patrick Hunt commented on ZOOKEEPER-1255:
-----------------------------------------
I'm not convinced on this, for two reasons:
1) if we added a toString() to ProcessTxnResult, I think we'd want to have this
detail available. (also useful for debugging)
more importantly:
2) look at the structure of
org.apache.zookeeper.server.FinalRequestProcessor.processRequest(Request)
Really I think this method needs to be refactored into (at least) two parts,
the first will process the request, the second part will use the
ProcessTxnResult, notice that the second half is currently muddled with both rc
and request usage - notice that if you replaced request with rc you'd be pretty
close to being able to refactor this method. I suggest you look at this
approach instead, in which case ProcessTxnResult and those currently unused
fields will take on much more importance.
> unused fields in DataTree.ProcessTxnResult
> ------------------------------------------
>
> Key: ZOOKEEPER-1255
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1255
> Project: ZooKeeper
> Issue Type: Sub-task
> Reporter: Thomas Koch
> Assignee: Thomas Koch
> Priority: Minor
> Attachments: ZOOKEEPER-1255.patch
>
>
> The fields zxid, cxid and clientId in ProcessTxnResult are never used. cxid
> and clientId are used in equals() and hashCode() but the class is never ever
> used as a key or compared.
> Keeping equals() and hashCode() "just in case" is a bad idea:
> http://www.infoq.com/news/2011/05/less-code-is-better
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira