[infinispan-dev] JMX operations for recovery (ISPN-994)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] JMX operations for recovery (ISPN-994)

Mircea Markus
Hi,

After taking it with Jonathan here is the list of JMX operations I want to add for recovery: http://community.jboss.org/wiki/Transactionrecoverydesign#JMX_tooling_for_handling_in_doubt_transactions
Any feedback appreciated.

Cheers,
Mircea

 

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] JMX operations for recovery (ISPN-994)

Galder Zamarreno
Mircea,

What's the formatId:int and branchQualifier:byte[]? Where does the SA get this info from?

Also, I'd assume that globalTxId:byte[] to the byte[] returned as part of showInDoubtTransactions() ?

Cheers,

On Apr 4, 2011, at 1:46 PM, Mircea Markus wrote:

> Hi,
>
> After taking it with Jonathan here is the list of JMX operations I want to add for recovery: http://community.jboss.org/wiki/Transactionrecoverydesign#JMX_tooling_for_handling_in_doubt_transactions
> Any feedback appreciated.
>
> Cheers,
> Mircea
>
>  
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] JMX operations for recovery (ISPN-994)

Mircea Markus

On 4 Apr 2011, at 17:37, Galder Zamarreño wrote:

Mircea,

What's the formatId:int and branchQualifier:byte[]? Where does the SA get this info from?
This is the definition of the xid: http://download.oracle.com/javaee/1.3/api/javax/transaction/xa/Xid.html
It is received from the TM

Also, I'd assume that globalTxId:byte[] to the byte[] returned as part of showInDoubtTransactions() ?
showInDoubtTransaction returns the Xid which includes globalTxXid.

Cheers,

On Apr 4, 2011, at 1:46 PM, Mircea Markus wrote:

Hi,

After taking it with Jonathan here is the list of JMX operations I want to add for recovery: http://community.jboss.org/wiki/Transactionrecoverydesign#JMX_tooling_for_handling_in_doubt_transactions
Any feedback appreciated.

Cheers,
Mircea


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] JMX operations for recovery (ISPN-994)

Galder Zamarreno

On Apr 4, 2011, at 6:58 PM, Mircea Markus wrote:

>
> On 4 Apr 2011, at 17:37, Galder Zamarreño wrote:
>
>> Mircea,
>>
>> What's the formatId:int and branchQualifier:byte[]? Where does the SA get this info from?
> This is the definition of the xid: http://download.oracle.com/javaee/1.3/api/javax/transaction/xa/Xid.html
> It is received from the TM

Right, I think I understand what you mean now. I think that then:

showInDoubtTransactions(): (xid:Xid, internalId:Long, status:String)

Should really be:

showInDoubtTransactions(): (formatId:int, branchQualifier:byte[], globalTxId:byte[], internalId:Long, status:String)

Correct? Otherwise, if you really wanna leave as showInDoubtTransactions returning xid:Xid, then it'd make sense having:

forceRollback(xid: Xid) : String
forceCommit(xid: Xid) : String

Wouldn't it?

>>
>> Also, I'd assume that globalTxId:byte[] to the byte[] returned as part of showInDoubtTransactions() ?
> showInDoubtTransaction returns the Xid which includes globalTxXid.
>>
>> Cheers,
>>
>> On Apr 4, 2011, at 1:46 PM, Mircea Markus wrote:
>>
>>> Hi,
>>>
>>> After taking it with Jonathan here is the list of JMX operations I want to add for recovery: http://community.jboss.org/wiki/Transactionrecoverydesign#JMX_tooling_for_handling_in_doubt_transactions
>>> Any feedback appreciated.
>>>
>>> Cheers,
>>> Mircea
>>>
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] JMX operations for recovery (ISPN-994)

Manik Surtani
In reply to this post by Mircea Markus
How do you generate the Long internalID of an XID?  

Another approach may be to take the byte[] (XID) and Base64 it.  Then you have a 1-to-1 mapping between the XID and a JMX-friendly String.  :-)  Or maybe an SHA1 hash of the byte[].



On 4 Apr 2011, at 12:46, Mircea Markus wrote:

Hi,

After taking it with Jonathan here is the list of JMX operations I want to add for recovery: http://community.jboss.org/wiki/Transactionrecoverydesign#JMX_tooling_for_handling_in_doubt_transactions
Any feedback appreciated.

Cheers,
Mircea

 
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev



_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] JMX operations for recovery (ISPN-994)

Mircea Markus

On 18 Apr 2011, at 10:57, Manik Surtani wrote:

How do you generate the Long internalID of an XID?  
I'va factorised the IdGenerator(now ClusterIdGenerator)  galder wrote for generating cluster-unique longs for HR's versioned operations.  

Another approach may be to take the byte[] (XID) and Base64 it.  Then you have a 1-to-1 mapping between the XID and a JMX-friendly String.  :-)  Or maybe an SHA1 hash of the byte[].
yes,that would work as well. A long is smaller and (not that matters a lot) cheaper to generate. 


On 4 Apr 2011, at 12:46, Mircea Markus wrote:

Hi,

After taking it with Jonathan here is the list of JMX operations I want to add for recovery: http://community.jboss.org/wiki/Transactionrecoverydesign#JMX_tooling_for_handling_in_doubt_transactions
Any feedback appreciated.

Cheers,
Mircea

 
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] JMX operations for recovery (ISPN-994)

Manik Surtani

On 18 Apr 2011, at 12:05, Mircea Markus wrote:

>> Another approach may be to take the byte[] (XID) and Base64 it.  Then you have a 1-to-1 mapping between the XID and a JMX-friendly String.  :-)  Or maybe an SHA1 hash of the byte[].
> yes,that would work as well. A long is smaller and (not that matters a lot) cheaper to generate.

But it could roll over (yes, I know unlikely), and you also have the issue of encoding the node that generates the long into the long which is open to corruption if nodes join/leave and the cluster size is large.

But it's no biggie, works for now basically.  Just keep in mind that in future a more robust/direct 1-to-1 mapping between XID and some JMX-friendly representation may be necessary.

--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev