Skip to content

Commit 2c21871

Browse files
author
Sophia Tevosyan
committed
missed an earlier PR comment
1 parent 298d911 commit 2c21871

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Worker/Grpc/GrpcOrchestrationRunner.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ public static string LoadAndRun(
212212
// If this is the first orchestration execution, then the past events count will be 0 but includePastEvents will be true (there are just none to include).
213213
// Otherwise, there is an orchestration history but DurableTask.Core did not attach it since the extended session is still active on its end, but we have since evicted the
214214
// session and lost the orchestration history so we cannot replay the orchestration.
215-
if (pastEvents.Count == 0 && (properties.TryGetValue("IncludePastEvents", out object? pastEventsIncluded) && !(bool)pastEventsIncluded!))
215+
if (pastEvents.Count == 0
216+
&& (properties.TryGetValue("IncludePastEvents", out object? pastEventsIncludedObj)
217+
&& pastEventsIncludedObj is bool pastEventsIncluded
218+
&& !pastEventsIncluded))
216219
{
217220
requiresHistory = true;
218221
}

0 commit comments

Comments
 (0)