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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1226:
----------------------------------------------------------


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

Ship it!


- Camille


On 2011-10-16 17:09:47, Thomas Koch wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2397/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-10-16 17:09:47)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1226.
bq.      https://issues.apache.org/jira/browse/ZOOKEEPER-1226
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 
ce58145 
bq.  
bq.  Diff: https://reviews.apache.org/r/2397/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.


                
> extract version check in separate method in PrepRequestProcessor
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1226
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1226
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1226.patch
>
>
> The following code is repeated 4 times and should be put in a method that 
> either throws the Exception or returns the incremented version (see below).
> {code}
> version = setDataRequest.getVersion();
> int currentVersion = nodeRecord.stat.getVersion();
> if (version != -1 && version != currentVersion) {
>     throw new KeeperException.BadVersionException(path);
> }
> version = currentVersion + 1;
> {code}
> {code}
> private static int checkAndIncVersion(int currentVersion, int 
> versionToCompare, String path )
> {code}

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