Re: outrigger recovery
"John McClain - Sun Microsystems, Inc." <[email protected]>
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
solomon wu wrote: > Yes, that helps, John, > Is there any documents on the outrigger's internal? Not really (besides the comments in the code itself). > Would you kindly point out which classes are involved with the recovery as > it is kind of easy to get lost in the mass of code without a guide. The persistent store is abstracted behind the Store interface. The Store is fetched from the configuration and initialized by calling the setupStore method which takes a Recover object. OutriggerServerImpl passes itself as the Recover object into setupStore. OutriggerServerImpl implementation of Recover is about 4/5th of the way into the file, look for the comment "Recover stuff" Assuming you are most interested in transactions you want to look at recoverWrite, recoverTake, and recoverTransaction. recoverWrite is called for each entry that had been written but not removed. It is also called for entries that have been written under a transaction, but the transaction is in the prepared state. recoverTake is called for each entry that has been taken under a transaction but the transaction is still in the prepared state (note, the entry being taken will have already been passed through to a recoverWrite call). In theory it could also be called for an entry not taken under a transaction, but none of the current stores do that - the preference is to not call recoverWrite in the first place. recoverTransaction is called for each prepared transaction - it has to be called before that transaction is referenced in a recoverWrite or recoverTake call. The recoverWrite and recoverTake calls fill in Outrigger's basic tables in - the lists of entries, the map of Uuid, etc., but not the transactions. After setupStore returns OutriggerServerImpl calls recoverTxns on itself. recoverTxns sets up txnTable and kicks off the TxnMontorTasks that will poll the transaction manager to see if a given transaction has been resolved. I can go into more detail, but that should give you a top level idea of what is going on with recovery where transactions are concerned, if not I can try again. -- John McClain [email protected] Sun Microsystems, Inc. Burlington, MA no files, just services =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff JAVASPACES-USERS". For general help, send email to [email protected] and include in the body of the message "help". To view past JAVASPACES-USERS postings, please see: http://archives.java.sun.com/archives/javaspaces-users.html