Hi,
Thanks for the response, I'm getting Module name: app is invalid
executing it inside my wpf root folder or on the host folder. There's no update after executing abp generate-proxy -t csharp -u https://localhost:44361/
.
I have updated logic/filtering data of getting products on the appservice and on the repository (GetListAsync
). I am using the client proxy in a wpf but it seems not updated. Is there any way to re-generate the generated code in the HttpApi.Client
client proxies? or I'll just need to manually update the source code of the generated client proxy?
Hi,
I found out that I sort the wrong field, the Name
sorting is causing the issue. The data I have has multiple products that has the same Name
, so for example I have 5 names which is "A A" then query with
{"skip": 0, "limit": 1, "sort": { "Name": 1 }}
{"skip": 1, "limit": 1, "sort": { "Name": 1 }}
{"skip": 2, "limit": 1, "sort": { "Name": 1 }}
will show the same result which if queried by sort of Name
.
So instead I used the CreationTime
field to sort.
Hi,
We will check it.
Hi,
How's it going on?
ProductService.HttpApi.Host
LimitedResultRequestDto.DefaultMaxResultCount
to a large number e.g.200000
-Use the ProductService.HttpApi.Client
for client remote service using WPF
-Get the data using the client proxy GetListAsync() multiple times with SkipCount up to TotalCountThere is something wrong with the data returned here.. even I used SkipCount
it doesn't seems to be skipping and returns the same value. Also when I try to change the initialFetchCount
e.g. 20k, 10 or 20 the GetListAsync()
sometimes has a duplicate data from the recent collection results. There's a scenario I fetched 300k+ data with multiple server calls I got about 6 data duplicate instances.
var initialFetchCount = 1;
var products = await ProductClientProxy.GetListAsync(new GetProductsInput
{Sorting = "Name ASC", MaxResultCount = initialFetchCount});
var products2 = await ProductClientProxy.GetListAsync(new GetProductsInput
{Sorting = "Name ASC",SkipCount = initialFetchCount, MaxResultCount = initialFetchCount});
var products3 = await ProductClientProxy.GetListAsync(new GetProductsInput
{Sorting = "Name ASC",SkipCount = initialFetchCount*2, MaxResultCount = initialFetchCount});
[06:01:55 ERR] ---------- RemoteServiceErrorInfo ----------
{
"code": null,
"message": "An internal error occurred during your request!",
"details": null,
"data": {},
"validationErrors": null
}
[06:01:55 ERR] Command aggregate failed: PlanExecutor error during aggregation :: caused by :: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to o
pt in..
MongoDB.Driver.MongoCommandException: Command aggregate failed: PlanExecutor error during aggregation :: caused by :: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass
allowDiskUse:true to opt in..
at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.ProcessResponse(ConnectionId connectionId, CommandMessage responseMessage)
at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.ExecuteAsync(IConnection connection, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Servers.Server.ServerChannel.ExecuteProtocolAsync[TResult](IWireProtocol`1 protocol, ICoreSession session, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.RetryableReadOperationExecutor.ExecuteAsync[TResult](IRetryableReadOperation`1 operation, RetryableReadContext context, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.ReadCommandOperation`1.ExecuteAsync(RetryableReadContext context, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.AggregateOperation`1.ExecuteAsync(RetryableReadContext context, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.AggregateOperation`1.ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)
at MongoDB.Driver.OperationExecutor.ExecuteReadOperationAsync[TResult](IReadBinding binding, IReadOperation`1 operation, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperationAsync[TResult](IClientSessionHandle session, IReadOperation`1 operation, ReadPreference readPreference, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.AggregateAsync[TResult](IClientSessionHandle session, PipelineDefinition`2 pipeline, AggregateOptions options, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSessionAsync[TResult](Func`2 funcAsync, CancellationToken cancellationToken)
at MongoDB.Driver.IAsyncCursorSourceExtensions.ToListAsync[TDocument](IAsyncCursorSource`1 source, CancellationToken cancellationToken)
at CMVPoint.ProductService.Products.MongoDbProductRepository.GetListAsync(String filterText, String name, Nullable`1 priceMin, Nullable`1 priceMax, String sorting, Int32 maxResultCount, Int32 skipCount, CancellationToken cance
llationToken) in D:\Projects\cmvpoint-initial-code\services\product\src\CMVPoint.ProductService.MongoDB\Products\MongoDbProductRepository.cs:line 35
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at CMVPoint.ProductService.Products.ProductAppService.GetListAsync(GetProductsInput input) in D:\Projects\cmvpoint-initial-code\services\product\src\CMVPoint.ProductService.Application\Products\ProductAppService.cs:line 24
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at lambda_method1317(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
ProductService.HttpApi.Host
LimitedResultRequestDto.DefaultMaxResultCount
to a large number e.g.200000
ProductService.HttpApi.Client
for client remote service using WPFGetListAsync()
multiple times with SkipCount
up to TotalCount
How can I avoid this issue?
hi
Add
MyMultiTenantConnectionStringResolver
to yourCMVPoint.IdentityService.MongoDB
project, I will fix this in 5.3 patch version.using System; using System.Threading.Tasks; using Microsoft.Extensions.Options; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; namespace CMVPoint.IdentityService.MongoDb; [Dependency(ReplaceServices = true)] public class MyMultiTenantConnectionStringResolver : MultiTenantConnectionStringResolver { public MyMultiTenantConnectionStringResolver( IOptionsMonitor<AbpDbConnectionOptions> options, ICurrentTenant currentTenant, IServiceProvider serviceProvider) : base(options, currentTenant, serviceProvider) { } public override Task<string> ResolveAsync(string connectionStringName = null) { if (connectionStringName == "Volo.Abp.Identity.MongoDB.IdentityProMongoDbContext") { return base.ResolveAsync("AbpIdentity"); } return base.ResolveAsync(connectionStringName); } public override string Resolve(string connectionStringName = null) { if (connectionStringName == "Volo.Abp.Identity.MongoDB.IdentityProMongoDbContext") { return base.Resolve("AbpIdentity"); } return base.Resolve(connectionStringName); } }
Hi, thanks issue has been resolved.
hi
Can you share the source code with me? liming.ma@volosoft.com
I invited you to a private github repo.