Hi Jeroen,

On Thu, Jun 7, 2012 at 12:50 AM, Jeroen Vermeulen <j...@canonical.com> wrote:
> It's important to tread carefully though.  Consider:
>
>  1. Start transaction.
>  2. Update data in the database.
>  3. Lose connection, and implicitly, abort transaction.
>  4. Restore connection and start new transaction.
>  5. Update more data in the database.
>  6. Commit.
>
> In this scenario, you get a paradox where there's no trace of step 2 in the
> database and yet step 5 has definitely been committed.  So recovering
> connections is not quite as simple as it seems!

Storm raises a DisconnectionError whenever #3 happens and it rolls
back the Store (to clear its internal cache in addition to resetting
the connection).  IOW, your application code gets a clear signal that
#3 happened and needs to be smart enough to redo #2.

Thanks,
J.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : launchpad-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to