Ticket #252 (new defect)

Opened 3 years ago

Last modified 3 years ago

nested transactions

Reported by: glyph Assigned to: glyph
Priority: low Milestone: Money2
Component: Axiom Severity: normal
Keywords: Cc:
Author: Branch:

Description

Although SQLite doesn't provide nested transactions, Axiom is already trapping all SQL statements on their way to the database.

If we create a 'mark' in that stream of statements, we can do sub-transaction rollback by rollback, replay to the mark, in-memory revert from database state in transaction at that point.

This would make it safe to do something like:

def runit(st, obj):
    try:
        result = st.transact(obj.run)
    except:
        result = log_run_failure()
    return result
st.transact(runit, st, ???)

While this is currently safe if 'runit' is run outside a transaction, it's not really possible to know in advance whether it will be run inside or outside.

Change History

11/03/05 01:38:58 changed by glyph

  • priority changed from normal to low.
jethro@divmod.org