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
Describe the bug
I am facing a recurrent issue, where-in, IBulkExecutor.BulkUpdateAsync() method fails if there are certain characters in the document id, like single quotes(‘). Error message given below.
To Reproduce
Create a document with single quotes(‘) in the id like Jack's Doc. Perform an update using IBulkExecutor.BulkUpdateAsync()
Expected behavior
BulkUpdate should be successful.
Actual behavior
BulkUpdate operation fails with error - Syntax error, incorrect syntax near 's
Could not update documents using bulk update. Error: Microsoft.Azure.Documents.DocumentClientException: Partition range id 3 | Failed to update mini-batch. Exception was Message: {"Errors":["Encountered exception while executing function. Exception = Error: {"errors":[{"severity":"Error","location":{"start":42,"end":43},"code":"SC1001","message":"Syntax error, incorrect syntax near 's'."}]}\r\nStack trace: Error: {"errors":[{"severity":"Error","location":{"start":42,"end":43},"code":"SC1001","message":"Syntax error, incorrect syntax near 's'."}]}\n
at queryCallback (script.js:5397:26)\n
at Anonymous function (script.js:615:29)"]}
ActivityId: 61705f0e-f948-493e-b649-14fe7024d1ff, Request URI: /apps/0156f92e-e3ce-40cc-b1ee-be8393bd1b32/services/f171d3ba-4d9a-40be-94a6-5c9b19bcd2f8/partitions/379b8de3-6bf6-4c12-bf71-bbef4effd767/replicas/132607834142155622p/, RequestStats: , SDK: documentdb-dotnet-sdk/2.0.0 Host/64-bit MicrosoftWindowsNT/6.2.9200.0. Status code was 400
ActivityId: fbde4c11-59a0-4587-a19e-7ee710ccc3d5, documentdb-dotnet-sdk/2.0.0 Host/64-bit MicrosoftWindowsNT/6.2.9200.0 ---> Microsoft.Azure.Documents.BadRequestException: Message: {"Errors":["Encountered exception while executing function. Exception = Error: {"errors":[{"severity":"Error","location":{"start":42,"end":43},"code":"SC1001","message":"Syntax error, incorrect syntax near 's'."}]}\r\nStack trace: Error: {"errors":[{"severity":"Error","location":{"start":42,"end":43},"code":"SC1001","message":"Syntax error, incorrect syntax near 's'."}]}\n
at queryCallback (script.js:5397:26)\n
at Anonymous function (script.js:615:29)"]}
ActivityId: 61705f0e-f948-493e-b649-14fe7024d1ff, Request URI: /apps/0156f92e-e3ce-40cc-b1ee-be8393bd1b32/services/f171d3ba-4d9a-40be-94a6-5c9b19bcd2f8/partitions/379b8de3-6bf6-4c12-bf71-bbef4effd767/replicas/132607834142155622p/, RequestStats: , SDK: documentdb-dotnet-sdk/2.0.0 Host/64-bit MicrosoftWindowsNT/6.2.9200.0
at Microsoft.Azure.Documents.TransportClient.ThrowIfFailed(String resourceAddress, StoreResponse storeResponse, Uri physicalAddress, Guid activityId)
at Microsoft.Azure.Documents.Rntbd.TransportClient.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ConsistencyWriter.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ConsistencyWriter.d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ReplicatedResourceClient.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ReplicatedResourceClient.<>c__DisplayClass21_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility1.<>c__DisplayClass4_01.<b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility1.<ExecuteRetry>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Documents.BackoffRetryUtility1.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility1.<ExecuteAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ReplicatedResourceClient.d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.StoreClient.d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.Client.DocumentClient.d__281.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.Client.DocumentClient.d__2441.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Documents.BackoffRetryUtility1.<>c__DisplayClass1_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility1.<ExecuteRetry>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Documents.BackoffRetryUtility1.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility`1.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.BatchUpdater.<>c__DisplayClass8_0.<b__0>d.MoveNext() in d:\dbs\sh\csdb\0913_140352\cmd\3\Product\Tools\BulkExecutorLib.net\BulkExecutor\BulkUpdate\BatchUpdater.cs:line 96
--- End of inner exception stack trace ---
at Microsoft.Azure.CosmosDB.BulkExecutor.CongestionController.<>c__DisplayClass17_0.<b__1>d.MoveNext() in d:\dbs\sh\csdb\0913_140352\cmd\3\Product\Tools\BulkExecutorLib.net\BulkExecutor\CongestionController.cs:line 182
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.CosmosDB.BulkExecutor.CongestionController.d__17.MoveNext() in d:\dbs\sh\csdb\0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.CosmosDB.BulkExecutor.BulkExecutor.d__24.MoveNext() in d:\dbs\sh\csdb\0913_140352\cmd\3\Product\Tools\BulkExecutorLib.net\BulkExecutor\BulkExecutor.cs:line 737
The text was updated successfully, but these errors were encountered:
Describe the bug
I am facing a recurrent issue, where-in, IBulkExecutor.BulkUpdateAsync() method fails if there are certain characters in the document id, like single quotes(‘). Error message given below.
To Reproduce
Create a document with single quotes(‘) in the id like Jack's Doc. Perform an update using IBulkExecutor.BulkUpdateAsync()
Expected behavior
BulkUpdate should be successful.
Actual behavior
BulkUpdate operation fails with error - Syntax error, incorrect syntax near 's
Environment summary
SDK Version:
Microsoft.Azure.CosmosDB.BulkExecutor" version="1.1.0"
Microsoft.Azure.DocumentDB version="2.0.0"
OS Version (e.g. Windows): Win10/WinServer19
Additional context
Stack Trace
Could not update documents using bulk update. Error: Microsoft.Azure.Documents.DocumentClientException: Partition range id 3 | Failed to update mini-batch. Exception was Message: {"Errors":["Encountered exception while executing function. Exception = Error: {"errors":[{"severity":"Error","location":{"start":42,"end":43},"code":"SC1001","message":"Syntax error, incorrect syntax near 's'."}]}\r\nStack trace: Error: {"errors":[{"severity":"Error","location":{"start":42,"end":43},"code":"SC1001","message":"Syntax error, incorrect syntax near 's'."}]}\n
at queryCallback (script.js:5397:26)\n
at Anonymous function (script.js:615:29)"]}
ActivityId: 61705f0e-f948-493e-b649-14fe7024d1ff, Request URI: /apps/0156f92e-e3ce-40cc-b1ee-be8393bd1b32/services/f171d3ba-4d9a-40be-94a6-5c9b19bcd2f8/partitions/379b8de3-6bf6-4c12-bf71-bbef4effd767/replicas/132607834142155622p/, RequestStats: , SDK: documentdb-dotnet-sdk/2.0.0 Host/64-bit MicrosoftWindowsNT/6.2.9200.0. Status code was 400
ActivityId: fbde4c11-59a0-4587-a19e-7ee710ccc3d5, documentdb-dotnet-sdk/2.0.0 Host/64-bit MicrosoftWindowsNT/6.2.9200.0 ---> Microsoft.Azure.Documents.BadRequestException: Message: {"Errors":["Encountered exception while executing function. Exception = Error: {"errors":[{"severity":"Error","location":{"start":42,"end":43},"code":"SC1001","message":"Syntax error, incorrect syntax near 's'."}]}\r\nStack trace: Error: {"errors":[{"severity":"Error","location":{"start":42,"end":43},"code":"SC1001","message":"Syntax error, incorrect syntax near 's'."}]}\n
at queryCallback (script.js:5397:26)\n
at Anonymous function (script.js:615:29)"]}
ActivityId: 61705f0e-f948-493e-b649-14fe7024d1ff, Request URI: /apps/0156f92e-e3ce-40cc-b1ee-be8393bd1b32/services/f171d3ba-4d9a-40be-94a6-5c9b19bcd2f8/partitions/379b8de3-6bf6-4c12-bf71-bbef4effd767/replicas/132607834142155622p/, RequestStats: , SDK: documentdb-dotnet-sdk/2.0.0 Host/64-bit MicrosoftWindowsNT/6.2.9200.0
at Microsoft.Azure.Documents.TransportClient.ThrowIfFailed(String resourceAddress, StoreResponse storeResponse, Uri physicalAddress, Guid activityId)
at Microsoft.Azure.Documents.Rntbd.TransportClient.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ConsistencyWriter.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ConsistencyWriter.d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ReplicatedResourceClient.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ReplicatedResourceClient.<>c__DisplayClass21_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility
1.<>c__DisplayClass4_0
1.<b__1>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility
1.<ExecuteRetry>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Documents.BackoffRetryUtility
1.d__5.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility
1.<ExecuteAsync>d__4
1.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.ReplicatedResourceClient.d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.StoreClient.d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.Client.DocumentClient.d__281.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.Client.DocumentClient.d__244
1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Documents.BackoffRetryUtility
1.<>c__DisplayClass1_0.<b__0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility
1.<ExecuteRetry>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Azure.Documents.ShouldRetryResult.ThrowIfDoneTrying(ExceptionDispatchInfo capturedException) at Microsoft.Azure.Documents.BackoffRetryUtility
1.d__5.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Documents.BackoffRetryUtility`1.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.CosmosDB.BulkExecutor.BulkUpdate.BatchUpdater.<>c__DisplayClass8_0.<b__0>d.MoveNext() in d:\dbs\sh\csdb\0913_140352\cmd\3\Product\Tools\BulkExecutorLib.net\BulkExecutor\BulkUpdate\BatchUpdater.cs:line 96
--- End of inner exception stack trace ---
at Microsoft.Azure.CosmosDB.BulkExecutor.CongestionController.<>c__DisplayClass17_0.<b__1>d.MoveNext() in d:\dbs\sh\csdb\0913_140352\cmd\3\Product\Tools\BulkExecutorLib.net\BulkExecutor\CongestionController.cs:line 182
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.CosmosDB.BulkExecutor.CongestionController.d__17.MoveNext() in d:\dbs\sh\csdb\0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.CosmosDB.BulkExecutor.BulkExecutor.d__24.MoveNext() in d:\dbs\sh\csdb\0913_140352\cmd\3\Product\Tools\BulkExecutorLib.net\BulkExecutor\BulkExecutor.cs:line 737
The text was updated successfully, but these errors were encountered: