当CosmosDb分区自动扩展(透明)时,BulkExecutor开始失败,出现Microsoft.Azure.Documents.InvalidPartitionException(下面的堆栈跟踪)。
由于异常类被声明为库内部而不是公共类,因此无法轻易捕获此异常。
题:
Microsoft.Azure.Documents.InvalidPartitionException:
at Microsoft.Azure.CosmosDB.BulkExecutor.CongestionController+<>c__DisplayClass17_0+<<ExecuteAllAsync>b__1>d.MoveNext (Microsoft.Azure.CosmosDB.BulkImport, Version=1.21.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Azure.CosmosDB.BulkExecutor.CongestionController+<ExecuteAllAsync>d__17.MoveNext (Microsoft.Azure.CosmosDB.BulkImport, Version=1.21.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Azure.CosmosDB.BulkExecutor.BulkExecutor+<ExecuteBulkImportImplAsync>d__19.MoveNext (Microsoft.Azure.CosmosDB.BulkImport, Version=1.21.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
这听起来像个错误。我在这里添加一个github问题:qazxsw poi
在他们公开公开此异常之前的解决方法是查看类型名称:
https://github.com/Azure/azure-cosmosdb-bulkexecutor-dotnet-getting-started/issues