alexvaluyskiy/Akka.Persistence.Azure

OutOfRangeInput caused by '/' in the PartitionKey & RowKey

Closed this issue · 3 comments

I get OutOfRangeInput failures which seems to origin from the fact that the PatitionKey & RowKey contains the '/' character. PartitionKey & RowKey must not contain the '/' character according to microsoft.

https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Understanding-the-Table-Service-Data-Model?redirectedfrom=MSDN

This since they seem to be set to the patj of a actor. Is this by design or have I configured the journal etc. in some faulty way?

Exception:

Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at Microsoft.WindowsAzure.Storage.Table.Protocol.TableOperationHttpResponseParsers.TableOperationPreProcess(TableResult result, TableOperation operation, HttpWebResponse resp, Exception ex) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Table\Protocol\TableOperationHttpResponseParsers.cs:line 53
at Microsoft.WindowsAzure.Storage.Table.TableOperation.<>c__DisplayClass4.b__2(RESTCommand1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Table\TableOperation.cs:line 133 at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse[T](IAsyncResult getResponseResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 299 --- End of inner exception stack trace --- at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndExecuteAsync[T](IAsyncResult result) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 50 at Microsoft.WindowsAzure.Storage.Table.CloudTable.EndExecute(IAsyncResult asyncResult) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Table\CloudTable.cs:line 95 at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.<>c__DisplayClass11.b__0(IAsyncResult ar) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Util\AsyncExtensions.cs:line 66
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Persistence.AzureTable.Journal.AzureTableJournal.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Persistence.AzureTable.Journal.AzureTableJournal.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Util.Internal.AtomicState.d__71.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Akka.Util.Internal.AtomicState.<CallThrough>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Pattern.Closed.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Akka.Pattern.CircuitBreaker.<WithCircuitBreaker>d__321.MoveNext()
Request Information
RequestID:756ce1be-0ef4-42dd-a26d-3df1a16ed2ef
RequestDate:Sat, 01 Apr 2017 22:52:30 GMT
StatusMessage:Bad Request
ErrorCode:OutOfRangeInput

It uses persistenceId as a PartitionKey. Do you have / symbol in your persistenceId?

Hi!

I am not using any persistenceId with the '/ 'character within it explcitily. Allthough I am using clustering.
The actual string that seem to cause the error is "/user/sharding/DiverActorCoordinator/singleton/coordinator". It might be that the clustering module uses persistenceid:s based on the actor path?

I tried to replace any illegal characters from the PersistenceId that gets passedin to Journal and Snapstore and it sems to work. Will create a pull request from it.