Re: A question about journal creation
Klaus Wuestefeld <[email protected]> Thu, 25 Jul 2013 15:58:09 -0300
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAMAooZENfhKn7YQrthMBPvH_bbfKJhGg=z2tXUrkD0NqVUpjpQ@mail.gmail.com> |
Since closing the prevalent system and restarting it is a cost you are willing to pay, if you do that before executing the transaction group, a new journal will be created, On Thu, Jul 25, 2013 at 2:15 PM, Paul Bennett <[email protected]> wrote: > We have a situation where we would like to run a group of transactions, and > be able to undo them as a group. We could define inverses on the > transactions and re-run, but this is complicated. In the context in which > they run, there would only be a single user on the system (an > administrator). The system would leave the single-user context with either > the group executed as normal, or not executed at all. There would be no > other transactions executing on the system while this group is executed and > possibly undone. > > Given these constraints, we think there is a simple implementation: simply > remove from the journal those transactions that need to be undone. We would > do this by taking a snapshot before the transactions are executed, starting > a new journal, and executing the transactions. Then, to undo, we simply > remove that new journal file, and reload the last snapshot. > > So: > > 1) Does this sound like a plausible solution? Have we missed something that > makes this unworkable? > > 2) The only thing missing from this to be done is the ability to control > explicitly the transaction boundaries on which a journal is created i.e. > there is no equivalent of takeSnapshot() for starting a new journal. > Obviously this has to be synced with execution and journal sync, so we would > propose to implement this by adding a boolean to the execute(Transaction t) > method, which would ultimately add a flag to TransactionCapsule, indicating > it should explicitly start a new journal before serialization - similar to > the test in PersistentJournal#append using the isOutputJournalStillValid() > method. > > Does this sound like a good/viable solution? > > Any comments/alternative ideas would be most welcome! > > Thanks in advance, > > -pb > > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > To unsubscribe go to the end of this page: > http://lists.sourceforge.net/lists/listinfo/prevayler-discussion > _______________________________________________ > "Databases in Memoriam" -- http://www.prevayler.org > -- Valeu, Klaus. ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org