Skip to content

Commit

Permalink
Fix SQL roundtrip issue for history event IDs (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgillum authored Dec 18, 2023
1 parent ceddafa commit 63727fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/DurableTask.SqlServer/SqlUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public static HistoryEvent GetHistoryEvent(this DbDataReader reader, bool isOrch
historyEvent = new OrchestratorStartedEvent(eventId);
break;
case EventType.SubOrchestrationInstanceCompleted:
historyEvent = new SubOrchestrationInstanceCompletedEvent(eventId, GetTaskId(reader), GetPayloadText(reader));
historyEvent = new SubOrchestrationInstanceCompletedEvent(eventId: -1, GetTaskId(reader), GetPayloadText(reader));
break;
case EventType.SubOrchestrationInstanceCreated:
historyEvent = new SubOrchestrationInstanceCreatedEvent(eventId)
Expand All @@ -156,15 +156,15 @@ public static HistoryEvent GetHistoryEvent(this DbDataReader reader, bool isOrch
}

historyEvent = new SubOrchestrationInstanceFailedEvent(
eventId,
eventId: -1,
taskScheduledId: GetTaskId(reader),
reason: subOrchFailedReason,
details: subOrchFailedDetails,
failureDetails: subOrchFailureDetails);
break;
case EventType.TaskCompleted:
historyEvent = new TaskCompletedEvent(
eventId,
eventId: -1,
taskScheduledId: GetTaskId(reader),
result: GetPayloadText(reader));
break;
Expand All @@ -179,7 +179,7 @@ public static HistoryEvent GetHistoryEvent(this DbDataReader reader, bool isOrch
}

historyEvent = new TaskFailedEvent(
eventId,
eventId: -1,
taskScheduledId: GetTaskId(reader),
reason: taskFailedReason,
details: taskFailedDetails,
Expand All @@ -201,7 +201,7 @@ public static HistoryEvent GetHistoryEvent(this DbDataReader reader, bool isOrch
};
break;
case EventType.TimerFired:
historyEvent = new TimerFiredEvent(eventId)
historyEvent = new TimerFiredEvent(eventId: -1)
{
FireAt = GetVisibleTime(reader),
TimerId = GetTaskId(reader),
Expand Down

0 comments on commit 63727fe

Please sign in to comment.