-
Notifications
You must be signed in to change notification settings - Fork 38
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
Avoid decrementing outstanding requests counter duplicately #935
Avoid decrementing outstanding requests counter duplicately #935
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't understand at what point an error could be thrown that would cause the post process to be executed twice when the transaction is committed or aborted. Would you mind giving more details ?
@Torch3333 Apologies for the previous lack of explanation. Firstly, the For the pause feature to function correctly, The callbacks, To address this issue, this PR introduces a safety measure to ensure the counter is only decremented once by using Please let me know if you need further clarification. |
@@ -441,7 +449,7 @@ private void cleanUp() { | |||
} | |||
} | |||
|
|||
postProcessor.run(); | |||
postProcess(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a confirmation. postProcesser
shouldn't be called if preProcesser
hasn't been called even in this cleanup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. postProcesser
should be called after preProcesser
has been called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the detailed explanation, I got it now. 🙇
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
…nuter-duplicately
Currently, there is a chance that the outgoing requests counter could be decremented twice when a transaction is being committed or rolled back, and an error occurs simultaneously. To prevent this, this PR introduces a safety measure to ensure the counter is only decremented once. Please take a look!