Skip to content

Conversation

@kaibocai
Copy link
Member

@kaibocai kaibocai commented Jun 2, 2023

Issue describing the changes in this PR

resolves 138

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes are added to the CHANGELOG.md
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

For a sample orchestration function

    @FunctionName("EternalOrchestrator")
    public void startWorkflowSchedule(@DurableOrchestrationTrigger(name = "runtimeState") TaskOrchestrationContext ctx) 
     {
        LOGGER.info("Doing something in the cleanup loop");

        ctx.createTimer(Duration.ofSeconds(60)).await();

        ctx.continueAsNew(null);
     }

The invocation process complete twice:

  1. First time at ctx.complete(null)
  2. Second time at
    This is the one causing exception as isCompleted flag is already set to true at the first complete.

Update the condition check at 2 to avoid repeating complete.

@kaibocai kaibocai merged commit 293489f into main Jun 5, 2023
@kaibocai kaibocai deleted the kaibocai/issue-138 branch June 5, 2023 21:50
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

Successfully merging this pull request may close these issues.

Eternal Functions not working as expected in Function Runtime Version: 4 Bug in functioning of continueAsNew() function in eternal orchestration

3 participants