Skip to content

Breaking change introduced in 1.0.0-rc2 #104

Closed

Description

While upgrading from 1.0.0-rc to 1.0.0 rc2 I bumped into the following issues :

1.0.0-rc code does not work on 1.0.0 rc2 schema because of :

2022-06-11 13:38:09.8689|ERROR| thread-4|DurableTask.Core| TaskOrchestrationDispatcher-b9972454c81c4376a0ad16bf55b44182-0: Failed to fetch a work-item: System.IndexOutOfRangeException: ExecutionID
   at Microsoft.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
   at Microsoft.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
   at DurableTask.SqlServer.SqlUtils.GetExecutionId(DbDataReader reader) in /_/src/DurableTask.SqlServer/SqlUtils.cs:line 325
   at DurableTask.SqlServer.SqlOrchestrationService.ReadHistoryEventsAsync(DbDataReader reader, String executionIdFilter, CancellationToken cancellationToken) in /_/src/DurableTask.SqlServer/SqlOrchestrationService.cs:line 521
   at DurableTask.SqlServer.SqlOrchestrationService.LockNextTaskOrchestrationWorkItemAsync(TimeSpan receiveTimeout, CancellationToken cancellationToken) in /_/src/DurableTask.SqlServer/SqlOrchestrationService.cs:line 177
   at DurableTask.Core.WorkItemDispatcher`1.DispatchAsync(WorkItemDispatcherContext context) System.IndexOutOfRangeException: ExecutionID
   at Microsoft.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
   at Microsoft.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
   at DurableTask.SqlServer.SqlUtils.GetExecutionId(DbDataReader reader) in /_/src/DurableTask.SqlServer/SqlUtils.cs:line 325
   at DurableTask.SqlServer.SqlOrchestrationService.ReadHistoryEventsAsync(DbDataReader reader, String executionIdFilter, CancellationToken cancellationToken) in /_/src/DurableTask.SqlServer/SqlOrchestrationService.cs:line 521
   at DurableTask.SqlServer.SqlOrchestrationService.LockNextTaskOrchestrationWorkItemAsync(TimeSpan receiveTimeout, CancellationToken cancellationToken) in /_/src/DurableTask.SqlServer/SqlOrchestrationService.cs:line 177
   at DurableTask.Core.WorkItemDispatcher`1.DispatchAsync(WorkItemDispatcherContext context)

1.0.0-rc2 code does not work on 1.0.0 rc schema because of :

2022-06-11 13:46:03.3205|ERROR|thread-32|DurableTask.Core| TaskOrchestrationDispatcher-d96429d88df842009a283db5f4d282da-0: Failed to fetch a work-item: Microsoft.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'dt._Discard
EventsAndUnlockInstance'.
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
   at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod)
   at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
   at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

So there is no way to migrate between the 2 versions without downtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions