temporalio/sdk-java

Activities that return with interrupted flag should be successfully reported as Completed

Offen

#731 geöffnet am 16.09.2021

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (231 Forks)auto 404
buggood first issue

Repository-Metriken

Stars
 (421 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Expected Behavior

If Activity

  • never noticed and interrupted flag or
  • caught an interrupted exception, restored the interrupted flag, and continued to run or returned a result should be reported as Completed with its returned value.

Actual Behavior

According to https://github.com/temporalio/sdk-java/pull/722#discussion_r707879325 if activity returns with an interrupted flag turned on, subsequent gRPC calls fail and the Activity result never gets reported.

Proposed solution

  • We should write a stable reproducible test close to a test that was changed in https://github.com/temporalio/sdk-java/pull/722
  • When Activity returns with interrupted flag = "true", we should hide the flag, report the result of Activity execution to the server, and return the flag back after that allowing the thread pool to stop.

Contributor Guide