[
https://issues.apache.org/jira/browse/GEODE-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15330902#comment-15330902
]
ASF subversion and git services commented on GEODE-1517:
--------------------------------------------------------
Commit 6f70cd703139417388fbd9845dd8aefb3b3f7c30 in incubator-geode's branch
refs/heads/feature/GEODE-1372 from [~eshu]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=6f70cd7 ]
GEODE-1517: fix TXStateProxyImpl continue working after TXManagerImpl is closed.
Holding the ReentrantLock during TXManagerImpl.close() when closing
TXStateProxyImpl. Provent any TXStateProxyImpl to work further. Add a test case
where it fails without the above fix and passes after the fix.
Also avoid going through synchronized failover map to check if a
TXStateProxyImpl is finished, instead, use its isInProgress() call.
> Transaction could still proceed after TXManagerImpl is closing during cache
> close.
> ----------------------------------------------------------------------------------
>
> Key: GEODE-1517
> URL: https://issues.apache.org/jira/browse/GEODE-1517
> Project: Geode
> Issue Type: Bug
> Components: transactions
> Reporter: Eric Shu
> Assignee: Eric Shu
>
> In GemFireCacheImpl.close method, TXManagerImpl.close() is invoked. It will
> try to cleanup the TXState.
> public void close() {
> if (isClosed()) {
> return;
> }
> this.closed = true;
> for (TXStateProxy proxy: this.hostedTXStates.values()) {
> proxy.close();
> }
> for (TXStateProxy proxy: this.localTxMap.values()) {
> proxy.close();
> }
> {
> TransactionListener[] listeners = getListeners();
> for (int i=0; i < listeners.length; i++) {
> closeListener(listeners[i]);
> }
> }
> }
> However, this close() method could be invoked while other p2p thread is still
> performing tx ops. And it could resurrect a closed TXStateProxy. With offheap
> enabled, this could cause offheap memory leak once cache is closed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)