[ 
https://issues.apache.org/jira/browse/GEODE-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bruce Schuchardt reopened GEODE-5269:
-------------------------------------

Previous fix cause unit test failures in a transaction test that closed its 
cache but didn't disconnect its DistributedSystem.

> CommitConflictException after TransactionInDoubtException
> ---------------------------------------------------------
>
>                 Key: GEODE-5269
>                 URL: https://issues.apache.org/jira/browse/GEODE-5269
>             Project: Geode
>          Issue Type: Test
>          Components: client/server, transactions
>            Reporter: Bruce Schuchardt
>            Assignee: Bruce Schuchardt
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.8.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> If a client initiates a transaction commit and gets a 
> TransactionInDoubtException because the server hosting the transaction is 
> shutting down the client can easily get a CommitConflictException if it 
> attempts another transaction using one or more of the same keys as the 
> in-doubt transaction.
> {noformat}
> org.apache.geode.cache.CommitConflictException: Concurrent transaction commit 
> detected The key  Object_130  in region  /testRegion  was being modified by 
> another transaction locally. org.apache.geode.cache.CommitConflictException: 
> Concurrent transaction commit detected The key  Object_130  in region  
> /testRegion  was being modified by another transaction locally.
>       at 
> org.apache.geode.internal.cache.locks.TXLockServiceImpl.txLock(TXLockServiceImpl.java:137)
>       at 
> org.apache.geode.internal.cache.TXLockRequest.obtain(TXLockRequest.java:88)
>       at 
> org.apache.geode.internal.cache.TXState.reserveAndCheck(TXState.java:335)
>       at org.apache.geode.internal.cache.TXState.commit(TXState.java:406)
>       at 
> org.apache.geode.internal.cache.TXStateProxyImpl.commit(TXStateProxyImpl.java:226)
>       at 
> org.apache.geode.internal.cache.TXManagerImpl.commit(TXManagerImpl.java:405)
>       at 
> org.apache.geode.internal.cache.tier.sockets.command.CommitCommand.cmdExecute(CommitCommand.java:82)
>       at 
> org.apache.geode.internal.cache.tier.sockets.BaseCommand.execute(BaseCommand.java:158)
>       at 
> org.apache.geode.internal.cache.tier.sockets.ServerConnection.doNormalMsg(ServerConnection.java:869)
>       at 
> org.apache.geode.internal.cache.tier.sockets.OriginalServerConnection.doOneMessage(OriginalServerConnection.java:77)
>       at 
> org.apache.geode.internal.cache.tier.sockets.ServerConnection.run(ServerConnection.java:1248)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>       at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$4$1.run(AcceptorImpl.java:644)
>       at java.lang.Thread.run(Thread.java:748)
> util.TestException: Unexpected 
> org.apache.geode.cache.CommitConflictException: Concurrent transaction commit 
> detected The key  Object_130  in region  /testRegion  was being modified by 
> another transaction locally. org.apache.geode.cache.CommitConflictException: 
> Concurrent transaction commit detected The key  Object_130  in region  
> /testRegion  was being modified by another transaction locally.
>       at 
> org.apache.geode.internal.cache.locks.TXLockServiceImpl.txLock(TXLockServiceImpl.java:137)
>       at 
> org.apache.geode.internal.cache.TXLockRequest.obtain(TXLockRequest.java:88)
>       at 
> org.apache.geode.internal.cache.TXState.reserveAndCheck(TXState.java:335)
>       at org.apache.geode.internal.cache.TXState.commit(TXState.java:406)
>       at 
> org.apache.geode.internal.cache.TXStateProxyImpl.commit(TXStateProxyImpl.java:226)
>       at 
> org.apache.geode.internal.cache.TXManagerImpl.commit(TXManagerImpl.java:405)
>       at 
> org.apache.geode.internal.cache.tier.sockets.command.CommitCommand.cmdExecute(CommitCommand.java:82)
>       at 
> org.apache.geode.internal.cache.tier.sockets.BaseCommand.execute(BaseCommand.java:158)
>       at 
> org.apache.geode.internal.cache.tier.sockets.ServerConnection.doNormalMsg(ServerConnection.java:869)
>       at 
> org.apache.geode.internal.cache.tier.sockets.OriginalServerConnection.doOneMessage(OriginalServerConnection.java:77)
>       at 
> org.apache.geode.internal.cache.tier.sockets.ServerConnection.run(ServerConnection.java:1248)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>       at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$4$1.run(AcceptorImpl.java:644)
>       at java.lang.Thread.run(Thread.java:748)
> {noformat}
> This is apparently due to the hosting server still being around and holding 
> the locks.  If you wait for a bit and then try the transaction again it'll 
> succeed because the server has finished shutting down and has released the 
> locks.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to