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




geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRTransactionDUnitTest.java
 (line 451)
<https://reviews.apache.org/r/53071/#comment222799>

    How about moving the rollback call to the "getTx" method?
    mgr.begin();
    boolean doRollback = true;
    try {
     pr.get(cust1):
     pr.get(cust2);
     doRollback = false;
    } finally {
      if (doRollback) {
        mgr.rollback();
      } else {
        mgr.commit();
      }
    }



geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRTransactionDUnitTest.java
 (line 456)
<https://reviews.apache.org/r/53071/#comment222793>

    how about changing this method to just be "getTx" and pass in a boolean 
that says "doCust1First".
    Then do this:
    CustId first = doCust1First ? cust1 : cust2;
    CustId second = !doCust1First ? cust1 : cust2;
    
    mgr.begin();
    pr.get(first);
    pr.get(second);
    mgr commit();


- Darrel Schneider


On Oct. 20, 2016, 4:29 p.m., Eric Shu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53071/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2016, 4:29 p.m.)
> 
> 
> Review request for geode, Darrel Schneider and Swapnil Bawaskar.
> 
> 
> Bugs: GEODE-2021
>     https://issues.apache.org/jira/browse/GEODE-2021
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Throw TransactionDataNotColocatedException when get locally failed with 
> BucketNotFoundException
> Added a dunit test which passes with the fix and failed without the fix.
> 
> 
> Diffs
> -----
> 
>   
> geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
>  baab79f 
>   geode-core/src/test/java/org/apache/geode/disttx/PRDistTXDUnitTest.java 
> f36085b 
>   
> geode-core/src/test/java/org/apache/geode/disttx/PRDistTXWithVersionsDUnitTest.java
>  268c2ed 
>   
> geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRColocationDUnitTest.java
>  1b8d2d1 
>   
> geode-core/src/test/java/org/apache/geode/internal/cache/execute/PRTransactionDUnitTest.java
>  516c240 
> 
> Diff: https://reviews.apache.org/r/53071/diff/
> 
> 
> Testing
> -------
> 
> precheckin.
> 
> 
> Thanks,
> 
> Eric Shu
> 
>

Reply via email to