Amazon.DynamoDBv2.AmazonDynamoDBException: Invalid UpdateExpression: Syntax error; token: \"=\", near: \"not_processed
Opened this issue · 0 comments
Describe the bug
Sometimes during a workflow execution we see the following exception:
Amazon.DynamoDBv2.AmazonDynamoDBException: Invalid UpdateExpression: Syntax error; token: "=", near: "not_processed
To Reproduce
use the following nuget versions:
WorkflowCore 3.6.2
WorkflowCore.Providers.AWS 3.6.0
happens after i configure: UseAwsDynamoLocking in startup.cs
Expected behavior
Should start the workflow
Additional context
Logs:
{"app":"MyApp","timestamp":"2024-11-12T11:52:22.7271646Z","message":"Starting step "WaitFor" on workflow "16f21c6f-4e4c-4636-a196-8d4dfe51234c"","level":"Debug","0":"WaitFor","1":"16f21c6f-4e4c-4636-a196-8d4dfe51234c","category":"WorkflowCore.Services.WorkflowExecutor","threadId":126,"version":"0.1.0+df7b726674aae621f4a6a7b477a91afb45072a98","logVersion":"2"}
{"app":"MyApp","timestamp":"2024-11-12T11:52:23.3639000Z","message":"Subscribing to event "operationCompletedEvent" "AlisTestingLockingZ3" for workflow "16f21c6f-4e4c-4636-a196-8d4dfe51234c" step 1","level":"Debug","0":"operationCompletedEvent","1":"AlisTestingLockingZ3","2":"16f21c6f-4e4c-4636-a196-8d4dfe51234c","3":1,"category":"WorkflowCore.Services.BackgroundTasks.WorkflowConsumer","threadId":77,"version":"0.1.0+df7b726674aae621f4a6a7b477a91afb45072a98","logVersion":"2"}
and then this error is thrown:
Amazon.DynamoDBv2.AmazonDynamoDBException: Invalid UpdateExpression: Syntax error; token: "=", near: "not_processed = :n"\r\n ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.\r\n at Amazon.Runtime.HttpWebRequestMessage.ProcessHttpResponseMessage(HttpResponseMessage responseMessage)\r\n at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken)\r\n at Amazon.Runtime.Internal.HttpHandler1.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n --- End of inner exception stack trace ---\r\n at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionStream(IRequestContext requestContext, IWebResponseData httpErrorResponse, HttpErrorResponseException exception, Stream responseStream)\r\n at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionAsync(IExecutionContext executionContext, HttpErrorResponseException exception)\r\n at Amazon.Runtime.Internal.ExceptionHandler
1.HandleAsync(IExecutionContext executionContext, Exception exception)\r\n at Amazon.Runtime.Internal.ErrorHandler.ProcessExceptionAsync(IExecutionContext executionContext, Exception exception)\r\n at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.Signer.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.XRay.Recorder.Handlers.AwsSdk.Internal.XRayPipelineHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)\r\n at WorkflowCore.Providers.AWS.Services.DynamoPersistenceProvider.MarkEventUnprocessed(String id, CancellationToken cancellationToken)\r\n at WorkflowCore.Services.BackgroundTasks.WorkflowConsumer.SubscribeEvent(EventSubscription subscription, IPersistenceProvider persistenceStore, CancellationToken cancellationToken)\r\n at WorkflowCore.Services.BackgroundTasks.WorkflowConsumer.SubscribeEvent(EventSubscription subscription, IPersistenceProvider persistenceStore, CancellationToken cancellationToken)\r\n at WorkflowCore.Services.BackgroundTasks.WorkflowConsumer.ProcessItem(String itemId, CancellationToken cancellationToken)\r\n at WorkflowCore.Services.BackgroundTasks.QueueConsumer.ExecuteItem(String itemId, EventWaitHandle waitHandle)