[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125932#comment-13125932
 ] 

[email protected] commented on ZOOKEEPER-1221:
----------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2359/
-----------------------------------------------------------

Review request for zookeeper.


Summary
-------

I'm working on a larger patch that makes the Request class immutable. To see, 
where the hdr and txn fields are modified, it helped to introduce accessor 
methods. The JVM should happily inline the method calls so no performance 
overhead should be expected.

There's a minor, unrelated change included: ToBeAppliedRequestProcessor had a 
reference to the toBeApplied list of the Leader. So it was hard to find all 
places, where this list was actually modified. The patch gives instead the 
leader instance to the toBeAppliedRequestProcessor and the processor then 
accesses leader.toBeApplied.


This addresses bug ZOOKEEPER-1221.
    https://issues.apache.org/jira/browse/ZOOKEEPER-1221


Diffs
-----

  src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java c746299 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ce58145 
  src/java/main/org/apache/zookeeper/server/Request.java 53631f1 
  src/java/main/org/apache/zookeeper/server/ZKDatabase.java 92f475b 
  src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java 
fec70de 
  src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java a0c2cbd 
  src/java/main/org/apache/zookeeper/server/quorum/FollowerZooKeeperServer.java 
95c77b5 
  src/java/main/org/apache/zookeeper/server/quorum/Leader.java 42bdfe9 
  src/java/main/org/apache/zookeeper/server/quorum/LeaderZooKeeperServer.java 
976726e 
  src/java/main/org/apache/zookeeper/server/quorum/Observer.java 2e15a81 
  
src/java/main/org/apache/zookeeper/server/quorum/ProposalRequestProcessor.java 
9d7de1d 
  src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java 
7f81a5a 
  src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShotV1.java 
1ca9f9a 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java 
be29939 

Diff: https://reviews.apache.org/r/2359/diff


Testing
-------


Thanks,

Thomas


                
> Provide accessors for Request.{hdr|txn}
> ---------------------------------------
>
>                 Key: ZOOKEEPER-1221
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1221
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>            Priority: Minor
>         Attachments: ZOOKEEPER-1221.patch
>
>
> I'm working on a larger patch that makes the Request class immutable. To see, 
> where the hdr and txn fields are modified, it helped to introduce accessor 
> methods. The JVM should happily inline the method calls so no performance 
> overhead should be expected.
> There's a minor, unrelated change included: ToBeAppliedRequestProcessor had a 
> reference to the toBeApplied list of the Leader. So it was hard to find all 
> places, where this list was actually modified. The patch gives instead the 
> leader instance to the toBeAppliedRequestProcessor and the processor then 
> accesses leader.toBeApplied.

--
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

        

Reply via email to