[storm] recovering from a transactionrollbackerror

Martin DeMello martindemello at gmail.com
Mon May 11 17:05:15 BST 2009


Nevermind, thought a bit about this and unless storm keeps track of
the "dirty" status of individual columns in a row, it's probably not
doable. Would still like to hear about people's general strategies for
handling rows that need to be updated concurrently by multiple
processes.

martin

On Mon, May 11, 2009 at 9:01 PM, Martin DeMello <martindemello at gmail.com> wrote:
> The problem with a TransactionRollbackError is that, well, it rolls
> back my transaction. Is there any way to retry the transaction or will
> I have to redo whatever changes I made to my objects as well? e.g
>
>  a = store.get(User, "Martin")
>  a.access = 'unrestricted'
>  store.commit() # => TransactionRollbackError
>
> Now, is the store itself irretrievably rolled back? Is there any way
> to remember that I had changed the object and just retry the commit? I
> had expected this to work
>
> try:
>  store.commit()
> except TransactionRollbackError
>  store.commit()
>
> but apparently it rolled back the store, not just the database transaction.
>
> martin
>



More information about the storm mailing list