[jboss-svn-commits] JBL Code SVN: r23820 - labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Nov 11 06:50:13 EST 2008
Author: adinn
Date: 2008-11-11 06:50:13 -0500 (Tue, 11 Nov 2008)
New Revision: 23820
Modified:
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java
Log:
relocated statistics counting code so BA coordinator can specialize BasicAction without changing its signature -- fixes for JBTM-404
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java 2008-11-11 11:20:34 UTC (rev 23819)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java 2008-11-11 11:50:13 UTC (rev 23820)
@@ -1839,9 +1839,6 @@
if (reportHeuristics || (!reportHeuristics && !TxControl.asyncCommit))
returnCurrentStatus = true;
- if (TxControl.enableStatistics)
- TxStats.incrementCommittedTransactions();
-
if (returnCurrentStatus)
{
if (reportHeuristics)
@@ -2187,7 +2184,17 @@
ActionManager.manager().remove(get_uid());
criticalEnd();
- }
+
+ // ok count this as a commit unless we got a heuristic rollback in which case phase2Abort
+ // will have been called and will already have counted it as an abort
+
+ if (TxControl.enableStatistics) {
+ if (heuristicDecision != TwoPhaseOutcome.HEURISTIC_ROLLBACK) {
+ TxStats.incrementCommittedTransactions();
+ }
+ }
+
+ }
}
/**
@@ -2254,9 +2261,11 @@
* rolling back because of a resource problem.
*/
- if (TxControl.enableStatistics)
- TxStats.incrementResourceRollbacks();
- }
+ if (TxControl.enableStatistics) {
+ TxStats.incrementResourceRollbacks();
+ TxStats.incrementAbortedTransactions();
+ }
+ }
/**
* Phase one of a two phase commit protocol. This function returns the
@@ -2568,7 +2577,7 @@
try
{
if (!currentStore.write_committed(u, tn, state))
- {
+ {
if (tsLogger.arjLoggerI18N.isWarnEnabled())
{
tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.coordinator.BasicAction_46", new Object[]
@@ -2753,8 +2762,17 @@
ActionManager.manager().remove(get_uid());
criticalEnd();
- }
+ if (TxControl.enableStatistics) {
+ if (actionStatus == ActionStatus.ABORTED) {
+ TxStats.incrementAbortedTransactions();
+ } else {
+ TxStats.incrementCommittedTransactions();
+ }
+ }
+
+ }
+
/**
* @return the current heuristic decision. Each time a heuristic outcome is
* received, we need to merge it with any previous outcome to
More information about the jboss-svn-commits
mailing list