Unwanted rollbacks on exception raises #743
Unanswered
andre-cavalheiro
asked this question in
Q&A
Replies: 1 comment
-
I was able to fix this, it turns out that the issue had nothing to do with the client itself, but due to our testing framework instead. I'm not able to delete the post, but it can be archived. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there, I created my own placeholder that fits my needs perfectly, except for one use-case, which I can't figure out why it's happening. Here's a slight simplification of the code so it'll be easier to read.
This should be a simple plug-and-play decorator that simply increases one of two counters, depending on whether the target function completes successfully or throws an exception.
Once the error counter is incremented, I want to raise the exception all the same, so the workflow can continue as it usually would without the decorator. However, once I raise the exception, the count increment seems to be "rolled back" for some reason, since my call to
registry.get_sample_value
returns None. I'm sure this is because of thatraise e
, because without it, this works out fine.Is this rollback behavior expected? Is there a simple way to overcome it?
Beta Was this translation helpful? Give feedback.
All reactions