microsoft / durabletask-java

Java SDK for Durable Functions and the Durable Task Framework
MIT License
14 stars 7 forks source link

Fix infinite loop when use continueasnew after wait external event #183

Closed kaibocai closed 1 year ago

kaibocai commented 1 year ago

Issue describing the changes in this PR

resolves https://github.com/microsoft/durabletask-java/issues/182

This PR fix a bug with the carrayOverEvents of continueAsNew API. The old implementation loops through the whole newEvents list to add EVENTRAISED to carrayOverEvents, which is not correct. With this fix, it only loops through events that haven't been processed in the newEvents list.

Pull request checklist

Additional information

Additional PR information