You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2016/01/25 17:54:16 UTC
svn commit: r1726655 - in /qpid/java/branches/6.0.x: ./
bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/
bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/
Author: orudyy
Date: Mon Jan 25 16:54:15 2016
New Revision: 1726655
URL: http://svn.apache.org/viewvc?rev=1726655&view=rev
Log:
QPID-6999: Revert changes to transaction exception handling as other changes made in QPID-6997 restart virtual host on JE environment restart which closes all the connections/sessions and their transactions preventing the original JIRA issue from occurance
merged from trunk
svn merge -c 1726653 https://svn.apache.org/repos/asf/qpid/java/trunk
Modified:
qpid/java/branches/6.0.x/ (props changed)
qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/StandardEnvironmentFacade.java
qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/ReplicatedEnvironmentFacade.java
Propchange: qpid/java/branches/6.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 25 16:54:15 2016
@@ -9,5 +9,5 @@
/qpid/branches/java-broker-vhost-refactor/java:1493674-1494547
/qpid/branches/java-network-refactor/qpid/java:805429-821809
/qpid/branches/qpid-2935/qpid/java:1061302-1072333
-/qpid/java/trunk:1715445-1715447,1715586,1715940,1716086-1716087,1716127-1716128,1716141,1716153,1716155,1716194,1716204,1716209,1716227,1716277,1716357,1716368,1716370,1716374,1716432,1716444-1716445,1716455,1716461,1716474,1716489,1716497,1716515,1716555,1716602,1716606-1716610,1716619,1716636,1717269,1717299,1717401,1717446,1717449,1717626,1717691,1717735,1717780,1718744,1718889,1718893,1718918,1718922,1719026,1719028,1719033,1719037,1719047,1719051,1720664,1721151,1721198,1722019,1722246,1722339,1723064,1723194,1723563,1724216,1724251,1724257,1724397,1724432,1724582,1724603,1724780,1724843-1724844,1725295,1725569,1726244,1726246,1726358,1726436,1726449,1726456
+/qpid/java/trunk:1715445-1715447,1715586,1715940,1716086-1716087,1716127-1716128,1716141,1716153,1716155,1716194,1716204,1716209,1716227,1716277,1716357,1716368,1716370,1716374,1716432,1716444-1716445,1716455,1716461,1716474,1716489,1716497,1716515,1716555,1716602,1716606-1716610,1716619,1716636,1717269,1717299,1717401,1717446,1717449,1717626,1717691,1717735,1717780,1718744,1718889,1718893,1718918,1718922,1719026,1719028,1719033,1719037,1719047,1719051,1720664,1721151,1721198,1722019,1722246,1722339,1723064,1723194,1723563,1724216,1724251,1724257,1724397,1724432,1724582,1724603,1724780,1724843-1724844,1725295,1725569,1726244,1726246,1726358,1726436,1726449,1726456,1726653
/qpid/trunk/qpid:796646-796653
Modified: qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/StandardEnvironmentFacade.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/StandardEnvironmentFacade.java?rev=1726655&r1=1726654&r2=1726655&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/StandardEnvironmentFacade.java (original)
+++ qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/StandardEnvironmentFacade.java Mon Jan 25 16:54:15 2016
@@ -47,7 +47,6 @@ import org.slf4j.LoggerFactory;
import org.apache.qpid.server.store.StoreException;
import org.apache.qpid.server.store.berkeleydb.logging.Slf4jLoggingHandler;
-import org.apache.qpid.server.util.ConnectionScopedRuntimeException;
public class StandardEnvironmentFacade implements EnvironmentFacade
{
@@ -143,12 +142,13 @@ public class StandardEnvironmentFacade i
{
tx.commitNoSync();
}
- catch (RuntimeException de)
+ catch (DatabaseException de)
{
LOGGER.error("Got DatabaseException on commit, closing environment", de);
closeEnvironmentSafely();
- handleCommitException(tx, de);
+
+ throw handleDatabaseException("Got DatabaseException on commit", de);
}
_committer.commit(tx, syncCommit);
}
@@ -160,12 +160,13 @@ public class StandardEnvironmentFacade i
{
tx.commitNoSync();
}
- catch (RuntimeException de)
+ catch (DatabaseException de)
{
LOGGER.error("Got DatabaseException on commit, closing environment", de);
closeEnvironmentSafely();
- handleCommitException(tx, de);
+
+ throw handleDatabaseException("Got DatabaseException on commit", de);
}
return _committer.commitAsync(tx, val);
}
@@ -442,16 +443,4 @@ public class StandardEnvironmentFacade i
cachedHandle.close();
}
}
-
- private void handleCommitException(final Transaction tx, RuntimeException e)
- {
- if (e instanceof IllegalStateException && !tx.isValid())
- {
- throw new ConnectionScopedRuntimeException("Commit aborted", e);
- }
- else
- {
- throw handleDatabaseException("Commit failed", e);
- }
- }
}
Modified: qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/ReplicatedEnvironmentFacade.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/ReplicatedEnvironmentFacade.java?rev=1726655&r1=1726654&r2=1726655&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/ReplicatedEnvironmentFacade.java (original)
+++ qpid/java/branches/6.0.x/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/ReplicatedEnvironmentFacade.java Mon Jan 25 16:54:15 2016
@@ -290,9 +290,9 @@ public class ReplicatedEnvironmentFacade
// the HA durability configuration to influence resulting behaviour.
tx.commit(_realMessageStoreDurability);
}
- catch (RuntimeException de)
+ catch (DatabaseException de)
{
- handleCommitException(tx, de);
+ throw handleDatabaseException("Got DatabaseException on commit, closing environment", de);
}
if (_coalescingCommiter != null && _realMessageStoreDurability.getLocalSync() == SyncPolicy.NO_SYNC
@@ -312,9 +312,9 @@ public class ReplicatedEnvironmentFacade
// the HA durability configuration to influence resulting behaviour.
tx.commit(_realMessageStoreDurability);
}
- catch (RuntimeException de)
+ catch (DatabaseException de)
{
- handleCommitException(tx, de);
+ throw handleDatabaseException("Got DatabaseException on commit, closing environment", de);
}
if (_coalescingCommiter != null && _realMessageStoreDurability.getLocalSync() == SyncPolicy.NO_SYNC
@@ -1843,18 +1843,6 @@ public class ReplicatedEnvironmentFacade
}
}
- private void handleCommitException(final Transaction tx, RuntimeException e)
- {
- if (e instanceof IllegalStateException && !tx.isValid())
- {
- throw new ConnectionScopedRuntimeException("Commit aborted", e);
- }
- else
- {
- throw handleDatabaseException("Commit failed", e);
- }
- }
-
private class RemoteNodeStateLearner implements Callable<Void>
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org