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

ASF GitHub Bot commented on GEODE-8907:
---------------------------------------

pivotal-eshu commented on a change in pull request #6054:
URL: https://github.com/apache/geode/pull/6054#discussion_r583911648



##########
File path: 
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClientServerTransactionDUnitTest.java
##########
@@ -2108,6 +2110,8 @@ public Object call() throws Exception {
         TXManagerImpl mgr = getGemfireCache().getTxManager();
         Region<Integer, String> r = getGemfireCache().getRegion(D_REFERENCE);
         Region<CustId, Customer> pr = getGemfireCache().getRegion(CUSTOMER);
+        TXStateProxy tx = mgr.internalSuspend();

Review comment:
       This will not address the issue we saw in the pipeline.
   The issue is the thread can not internalSuspend a transaction, if it does 
not in a txState. Which we saw in the test failure on the second call.
   
   The correct fix is change the first callable return mgr.getTransactionId() 
to mgr.suspend().
       final TXId txid = (TXId) client.invoke(new SerializableCallable() {
         @Override
         public Object call() throws Exception {
           ClientCacheFactory ccf = new ClientCacheFactory();
           ccf.addPoolServer("localhost"/* getServerHostName(Host.getHost(0)) 
*/, port1);
           ccf.addPoolServer("localhost", port2);
           ccf.setPoolLoadConditioningInterval(1);
           ccf.setPoolSubscriptionEnabled(false);
           ccf.set(LOG_LEVEL, getDUnitLogLevel());
           ClientCache cCache = getClientCache(ccf);
           ClientRegionFactory<CustId, Customer> custrf =
               cCache.createClientRegionFactory(ClientRegionShortcut.PROXY);
           ClientRegionFactory<Integer, String> refrf =
               cCache.createClientRegionFactory(ClientRegionShortcut.PROXY);
           Region<Integer, String> r = refrf.create(D_REFERENCE);
           Region<CustId, Customer> pr = custrf.create(CUSTOMER);
           // Region<Integer, String> order = refrf.create(ORDER);
   
           TXManagerImpl mgr = getGemfireCache().getTxManager();
           mgr.begin();
           int i = 0;
           for (int j = 0; j < 10; j++) {
             CustId custId = new CustId(i);
             Customer cust = new Customer("name" + i, "address" + i);
             getGemfireCache().getLogger().info("SWAP:putting:" + custId);
             pr.put(custId, cust);
             r.put(i, "value" + i);
           }
           return mgr.suspend();
         }
       });
   
   And here you can resume transaction by calling mgr.resume(txId);




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> CI Failure: ClientServerTransactionCCEDUnitTest.testTxRemoveAll
> ---------------------------------------------------------------
>
>                 Key: GEODE-8907
>                 URL: https://issues.apache.org/jira/browse/GEODE-8907
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 1.14.0
>            Reporter: Mark Hanson
>            Assignee: Louis R. Jacome
>            Priority: Major
>              Labels: pull-request-available
>
> [https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/DistributedTestOpenJDK8/builds/794]
>  reported a test failure 
>  
> {noformat}
> org.apache.geode.internal.cache.ClientServerTransactionCCEDUnitTest > 
> testTxRemoveAll FAILED
>     org.apache.geode.test.dunit.RMIException: While invoking 
> org.apache.geode.internal.cache.RemoteTransactionDUnitTest$34.call in VM 2 
> running on Host c44a375b0bbd with 4 VMs
>         Caused by:
>         java.lang.IllegalStateException: Thread does not have an active 
> transaction
>     org.apache.geode.test.dunit.RMIException: While invoking 
> org.apache.geode.internal.cache.RemoteTransactionDUnitTest$2.call in VM 0 
> running on Host c44a375b0bbd with 4 VMs
>         Caused by:
>         java.lang.AssertionError: Event never occurred after 30000 ms:  
> {noformat}
>  
> Logs available at
> {noformat}
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=  Test Results URI 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> http://files.apachegeode-ci.info/builds/apache-develop-main/1.14.0-build.0655/test-results/distributedTest/1612232803/
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Test report artifacts from this job are available at:
> http://files.apachegeode-ci.info/builds/apache-develop-main/1.14.0-build.0655/test-artifacts/1612232803/distributedtestfiles-OpenJDK8-1.14.0-build.0655.tgz
>  {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to