Bug 900289 (JBPAPP6-1490) - Domain management API does not expose JTS orphans from the transaction object store
Summary: Domain management API does not expose JTS orphans from the transaction object...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: JBPAPP6-1490
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Transaction Manager
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: DR1
: EAP 6.4.0
Assignee: Ivo Studensky
QA Contact: Ondrej Chaloupka
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard: eap601candidate
Depends On: 1028032
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-24 12:35 UTC by Ivo Studensky
Modified: 2019-08-19 12:42 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The transaction subsystem contained in JBoss EAP 6 maintains a log of pending transactions. This log is exposed to the console user. In some circumstances a resource has a log of an in-doubt transaction branch for which there is no corresponding top level transaction log (but on disk there is a participant log). Such logs are called "orphans" and by default these were not exposed in previous versions. As a result, if the transaction subsystem was configured to use JTS then these orphan records were not automatically removed resulting in a leak of available storage space. In this release, the console user can override the default by setting the transaction subsystem property `expose-all-logs` to `true`. Then the console user has the option to manually delete these logs, preventing the leak.
Clone Of:
Environment:
Last Closed: 2019-08-19 12:42:04 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPAPP6-1490 Major Closed Domain management API does not expose JTS orphans from the transaction object store 2014-09-04 15:05:58 UTC
Red Hat Bugzilla 1151071 None None None Never
JBoss Issue Tracker JBTM-2270 None None None Never
JBoss Issue Tracker WFLY-3613 Major Resolved Domain management API does not expose JTS orphans from the transaction object store 2014-09-04 15:05:58 UTC

Internal Links: 1151071

Description Ivo Studensky 2012-04-24 12:35:06 UTC
project_key: JBPAPP6

At the moment domain management API exposes transactions and their participants from the object store. Thus it is possible to traverse down from a transaction to its participant records which is nice.

However in special cases it is possible to create "orphan" records in the object store, i.e. XAResourceRecord's which do not have any corresponding transaction record in the log (e.g. XA resource prepared but crashed before the TM recorded the fact) and thus are inaccessible for the domain management API, see [1]. In case of JTA it is not very problem as JBossTS has orphan filters for JTA that can remove such orphans automatically. But in case of JTS this becomes to be a problem as JBossTS does not have any orphan filers for JTS and the orphan records stay in the object store. Because of this we would need a tool that can expose and remove such records at least for HornetQ based object store where it is not possible to remove them manually from the file system.
Another question is why JBossTS includes orphan filters only for JTA.

Please consider severity/priority of this issue and discuss the details.
Thanks.


[1] https://issues.jboss.org/browse/JBQA-5185?focusedCommentId=12684623&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12684623

Comment 1 Ivo Studensky 2012-04-24 12:36:01 UTC
Link: Added: This issue is related to JBQA-6260


Comment 2 Michael 2012-04-25 14:09:59 UTC
The Object Store tooling creates MBeans for transaction records and then creates MBeans to represent their participants. Since an orphan doesn't have a corresponding transaction MBeans are not created for them.

So I would need to add code to JBossTS to expose orphans as MBeans and then update the AS management subsystem to add a new child resource for exposing them.

ie we need another release of JBossTS to get this fixed.  

Comment 3 Rajesh Rajasekaran 2012-04-25 22:18:05 UTC
Labels: Added: eap6_need_triage


Comment 4 Rajesh Rajasekaran 2012-07-11 19:56:14 UTC
Labels: Removed: eap6_need_triage Added: eap601candidate


Comment 5 Michael 2012-08-21 13:15:53 UTC
Link: Added: This issue is a dependency of JBTM-1148


Comment 6 Michael 2012-08-22 15:27:24 UTC
Link: Added: This issue depends AS7-4331


Comment 7 Michael 2012-08-22 15:29:46 UTC
Link: Added: This issue is a dependency of AS7-4331


Comment 8 Anne-Louise Tangring 2012-11-13 21:00:29 UTC
Docs QE Status: Removed: NEW 


Comment 9 Stefano Maestri 2013-01-11 09:45:51 UTC
Reassingning to Heiko because the only dependency left is assigned to him

Comment 10 Michael 2013-02-27 18:29:07 UTC
To expose all the transaction logs we need an extra attribute on the transactions subsystem in the AS management model. The subsystem manages transaction logs via MBeans. So something like 

String EXPOSEALLLOGS = "expose-all-logs";
...

ObjectName on = new ObjectName("jboss.jta:type=ObjectStore")
MBeanServer mbs = TransactionExtension.getMBeanServer(context)

and then use the mbean server to update the MBean atribute

mbs.setAttribute(on, new Attribute("ExposeAllRecordsAsMBean", Boolean.TRUE) 

This operation will now expose all transaction logs.

Comment 11 tom.jenkinson 2014-09-02 09:57:28 UTC
Hi Ivo,

I noticed your change has been merged to WF, do you intend to perform the backport for this too?

Thanks very much,
Tom

Comment 12 Ivo Studensky 2014-09-02 13:38:25 UTC
Yes, I am going to port this back.

Comment 13 Ivo Studensky 2014-09-03 08:21:01 UTC
PR sent:

https://github.com/jbossas/jboss-eap/pull/1639

Comment 14 Hayk Hovsepyan 2014-09-26 14:08:37 UTC
Now setting "expose-all-logs" to true allows to show orphaned JTS logs.
Verified on jboss-eap-6.4.0.DR2


Note You need to log in before you can comment on or make changes to this bug.