Skip to content

Commit

Permalink
Fix compatibility issue between older clients and newer workers on DT…
Browse files Browse the repository at this point in the history
….AzureStorage (#651)
  • Loading branch information
cgillum authored Dec 1, 2021
1 parent a21c400 commit cfb0593
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DurableTask.AzureStorage/OrchestrationSessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,10 @@ async Task<IEnumerable<MessageData>> DedupeExecutionStartedMessagesAsync(
{
OrchestrationInstance localInstance = message.TaskMessage.OrchestrationInstance;
if (remoteOrchestrationsById.TryGetValue(localInstance.InstanceId, out OrchestrationState remoteInstance) &&
string.Equals(localInstance.ExecutionId, remoteInstance.OrchestrationInstance.ExecutionId, StringComparison.OrdinalIgnoreCase))
(remoteInstance.OrchestrationInstance.ExecutionId == null || string.Equals(localInstance.ExecutionId, remoteInstance.OrchestrationInstance.ExecutionId, StringComparison.OrdinalIgnoreCase)))
{
// Happy path: The message matches the table status. Allow it to run.
// Happy path: The message matches the table status. Alternatively, if the table doesn't have an ExecutionId field (older clients, pre-v1.8.5),
// then we have no way of knowing if it's a duplicate. Either way, allow it to run.
}
else if (this.IsScheduledAfterInstanceUpdate(message, remoteInstance))
{
Expand Down

0 comments on commit cfb0593

Please sign in to comment.