You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(extendedSessions.TryGetValue(request.InstanceId,outExtendedSessionState?extendedSessionState)&&extendedSessionStateis not null)
200
+
{
201
+
// If a history was provided, even if we already have an extended session stored, we always want to evict whatever state is in the cache and replace it with a new extended
202
+
// session based on the provided history
203
+
if(!pastEventsIncluded&&extendedSessions.TryGetValue(request.InstanceId,outExtendedSessionState?extendedSessionState)&&extendedSessionStateis not null)
@@ -205,20 +216,17 @@ public static string LoadAndRun(
205
216
}
206
217
}
207
218
else
208
-
{
219
+
{
220
+
extendedSessions.Remove(request.InstanceId);
209
221
addToExtendedSessions=true;
210
222
}
211
223
}
212
224
213
225
if(result==null)
214
226
{
215
-
// 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).
216
-
// 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
227
+
// DurableTask.Core did not attach the orchestration history since the extended session is still active on its end, but we have since evicted the
217
228
// session and lost the orchestration history so we cannot replay the orchestration.
// Now we will retry the same exact request. If the extended session is not evicted, then the request will fail due to duplicate ExecutionStarted events being detected
379
+
// If the extended session is evicted because IncludePastEvents is true, then the request will succeed and a new extended session will be stored
0 commit comments