A bit of context firstSince
this conversation in our Zulip, I have been developing the new recovery login in Narayana’s
RecoveryManagerImpl (which recovers in-flight/in-doubt transactions before terminating the recovery manager). It turns out that the hardest bit of this development is to find out if there are transactions left in the Object Store. In a first attempt to tackle this problem, I used the `
ObjStoreBrowser` in our package `com.arjuna.ats.arjuna.tools.osb.mbean`. Although `ObjStoreBrowser` worked like a charm, employing this Object Store browser is an overkill as this browser produces MBeans while navigating the Object Store. As an alternative, I developed a wrapper of `
ObjectStoreIterator` to check if a particular type has transactions associated with it.
Here where the question comesTo fetch transactions from the Object Store, I need to know (in advance) what types I want to skim through. Although this could be achieved by adding (another) configuration property in the
RecoveryEnvironmentBean (or wherever it is more appropriate), I was hoping to find a better/more elegant way to express what kind of types I am interested in (or, at the very least, shorten the list of types I have to specify in the new property). To achieve this, I thought that it might be worth to add an extra two methods to the
RecoveryStore interface:
- boolean allObjUidsDerivedFrom (String s, InputObjectState buff, int m)
- boolean allObjUidsDerivedFrom (String s, InputObjectState buff)
These two methods would fetch all transactions that are derived from a specific base class. For now, these methods would be employed only in the new logic to stop the recovery manager but I think that (in general) they might be useful methods to have in our
ObjectStoreAPI and they might simplify other parts of Narayana (e.g.
ObjStoreBrowser). What do you think about this?
Many thanks,
Manuel