Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

savepoint support ? #23

Closed
jvanasco opened this issue Jul 19, 2013 · 2 comments
Closed

savepoint support ? #23

jvanasco opened this issue Jul 19, 2013 · 2 comments

Comments

@jvanasco
Copy link
Contributor

is there any reason for the lack of savepoint support , other than it not being in zope.sendmail ? [ ie, does anyone know why it's not in zope.sendmail ? ]

i've been working on trying to patch this for savepoint support , and would appreciate any pointers.

@jvanasco
Copy link
Contributor Author

this took a few more hours than expected, but I seem to have gotten savepoint support in here:

jvanasco@06ad882

It passes tests and doesn't break any tests, but definitely needs use more eyes on it as I restructured some things ( and am not all that happy with this ; it was a crash course on learning transaction ).

Notes:

  • I added a DEBUG_FLOW boolean variable on line 39 of delivery.py to print out the def name and tpc info ; it's really useful when trying to map out the correct flow of multiple savepoints
  • there's a class of MaiDataManagerState codes. i tried to model everything between the zope.sqlalchemy and the sample transaction support in transaction ; a lot of this is not used and it all might be not needed.
  • i tried to wrap everything in a check for is_resource_in_transaction. i originally didn't notice that the AbstractMailDelivery.send function was wrapped in a transaction.join(). i split that into 2 lines on the send, and called a new join_transaction function.
  • I have abort_sub and commit_sub raise ValueErrors. I haven't been able to trigger these.
  • calls to abort have some quick assertion checks, and call an internal _resetTransaction function before the specified onAbort function
  • the _resetTransaction and _finish functions could probably go

@jvanasco
Copy link
Contributor Author

I'm closing this request in favor of #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant