Github user sbroeder commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/917#discussion_r96768810
--- Diff:
core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
---
@@ -1108,9 +1108,28 @@ public void run() {
}
if (LOG.isDebugEnabled()) LOG.debug("TRAF RCOV
THREAD: in-doubt transaction size " + transactionStates.size());
for (Map.Entry<Long, TransactionState> tsEntry
: transactionStates.entrySet()) {
+ int isTransactionStillAlive = 0;
TransactionState ts = tsEntry.getValue();
Long txID = ts.getTransactionId();
// TransactionState ts = new
TransactionState(txID);
+
+ //It is possible for long prepare
situations that involve multiple DDL
+ //operations, multiple prompts from RS is
received. Hence check to see if there
+ //is a TS object in main TS list and
transaction is still active.
+ //Note that tsEntry is local TS object.
+ if (hbtx.mapTransactionStates.get(txID) !=
null) {
+ if
(hbtx.mapTransactionStates.get(txID).getStatus().toString().contains("ACTIVE"))
{
+ isTransactionStillAlive = 1;
+ }
+ if (LOG.isInfoEnabled())
+ LOG.info("TRAF RCOV THREAD: TID " + txID
+ + " still has ts object in TM
memory with state "
+ +
hbtx.mapTransactionStates.get(txID).getStatus().toString()
--- End diff --
How do you feel about printing the entire TS object instead of just the
state? Some other useful information could be printed
for example:
LOG.info("TRAF RCOV THREAD: TID " + txID + " still has ts object in TM
memory " + hbtx.mapTransactionStates.get(txID).toString()
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---