[bugfix]: add presuspend sanity check and fix a bug in retry#275
[bugfix]: add presuspend sanity check and fix a bug in retry#275zhongkechen merged 5 commits intomainfrom
Conversation
29fae1c to
b74fbde
Compare
|
With this change we found a bug in Step operation: #295 |
|
The retry example still failing: https://github.com/aws/aws-durable-execution-sdk-java/actions/runs/23824927742/job/69445906795 The step operation failed at 45.429 second the polling request properly made afte ~1 second And the response contains the READY operation The poller future was completed The future was completed but the step was not retried because the following check in For a failed operation that is polling in the background, the runningUserHandler is already set. The exception thrown from here was swallowed because it's chained to a future. |
wangyb-A
left a comment
There was a problem hiding this comment.
Can we have a test case for this bug fix?
The new validation logic added in this PR caused existing cases to fail. No extra test case required. |
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
Fixes #291
Description
Just before go suspend, we do sanity check to make sure:
This change is to help us detect possible issues with suspend in our test cases, not to prevent them.
bug fix in
runUserHandlerFound a bug in
runUserHandlerwith the additional check.The future was completed but the step was not retried because the following check in
runUserHandlerfailed.For a failed operation that is polling in the background, the runningUserHandler is already set. The exception thrown from here was swallowed because it's chained to a future.
The fix is not only checking if it's null, but also check if it's done and the execution will be terminated if it's not null and not done, meaning a user function is still running.
Demo/Screenshots
Checklist
Testing
Unit Tests
Have unit tests been written for these changes?
Integration Tests
Have integration tests been written for these changes?
Examples
Has a new example been added for the change? (if applicable)