[
https://issues.apache.org/jira/browse/GEODE-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16498523#comment-16498523
]
ASF subversion and git services commented on GEODE-5269:
--------------------------------------------------------
Commit f50b9450b918ad4409c5a6ebf374b88de8c75986 in geode's branch
refs/heads/develop from [~bschuchardt]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=f50b945 ]
GEODE-5269 CommitConflictException after TransactionInDoubtException
Before sending a client a TransactionInDoubtException that is caused by
a server shutting down we now wait a bit for the server to finish shutting
down. This allows any locks it held to be released and avoids a
CommitConflictException if the client should immediately try another
transaction with the same key(s).
> 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
> Time Spent: 40m
> 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)