Activities of "enes.koroglu"

Hi @maliming

Any news about this problem?

Hi @alper my database is on the cloud and services are working on-premises so if there is too much round trip that may cause too much latency. And for 900 records 4.5 second is not also a good time. Is it possible to change fetching all records to fetching only current page records. And also could you please check if there is a loop for user or tenant info fetch?

Hi @gizem

Did you able to test?

Hi @alper did you try on your environment? Which indices you have on AbpLinkUsers or any related table? And why getting all records on a paged page, shouldn't it fetch 10 records for paged page?

  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

We are creating a support account, under every tenant and we are linking these accounts each other. Now we have aproximately 50 tenant and when we open Linked Accounts modal, it takes 30 seconds. This is really slow, if the number exceeds user gets timeout (so we removed some records to be able to open Linkend Accounts screen). I realised this endpoints gets whole records, not only selected page's records and also 50 records is not too much to take 30 seconds. I think there is a problem.

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Steps to reproduce the issue:"

I have some entities like below:

public class Order :AggregateRoot<Guid>
{
    public string Name { get; set; }
    public string Address { get; set; }
    public ICollection<OrderLine> Lines { get; set; }
}
public class OrderLine:Entity<Guid>
{
    public Guid ProductId { get; set; }
    public Guid OrderId { get; set; }
    public int Quantity { get; set; }
    public Product Product { get;}
}
public class Product:AggregateRoot<Guid>
{
    public string Name { get; set; }
    public string Description { get; set; }
}

public class EfCoreOrderRepository : EfCoreRepository<CommonDbContext, Order, Guid>, IOrderRepository
{
    public async Task<Order> GetWithNavigationPropertiesAsync(Guid id)
    {
        var query = from order in (await GetDbSetAsync()).Include(p => p.Lines).ThenInclude(s => s.Product)
                    where order.Id == id
                    select order;
        return await query.SingleAsync();
    }
}

I've added Product as a navigation property to OrderLine entity. But as we see in docs there is a section which says:

Do always reference to other aggregate roots by Id. Never add navigation properties to other aggregate roots.

  1. What is the main reason of this suggestion, could you please give more detail?
  2. If our way is wrong, how should we get Order/Lines and Product details on GetWithNavigationPropertiesAsync method.
  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Steps to reproduce the issue:"
    • Create a role named as role-supervisor.
    • Give below grants (Picture 1) to role-supervisor.
    • Assign role-supervisor to a user (supervisor).

-Picture 1-

This user can grant admin role to any user, or revoke admin role from any user as you can see in Picture 2. I want to create a role which can create/edit/lock/unlock user, assign/deassign roles to/from user. But i do not want the owner of this role to assign/deassign admin (or marked as special or private other roles) some other roles from/to users. There may be a solution like a new property for role as private. Define a new permission under Identity Management permission section for grant/revoke private role. Should be a new permission for grant/rekove private roles to any user. And owner of role-supervisor should not act on some private/special users.

-Picture 2-

Hi @liangshiwei

In above message your suggestion (below code) does not solve our problem. If we got any error on backgroudjob creation, process will be broken. If it's a UI call, user will get an error and business will be completed. As @ademaygun said there is no UI dashboard to manage and see background jobs for ABP's BackgroundJob system and in the documents ABP suggest us hangfire as an integrated solution. But ABP does not work with Hangfire properly. There would be same problem in EventBus but luckly ABP solves that problem with implementing inbox pattern. There could be same solution for background jobs.

Is it possible to discuss this problem with the team? This problem is really critical for us.

public async Task CreateAsync()
{
    using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true))
    {
        //...
        await productRepository.InsertAsync(new Product("Product1"));
        await uow.CompleteAsync();
    }
            
    await backgroundJobManager.EnqueueAsync(ProductJobArgs);
}
  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:

We create appService methods with [UnitOfWork(true)] attribute. Call our business related codes/methods and then make await CurrentUnitOfWork.SaveChangesAsync(); Then call one or more background job creation calls and when exit from appService methods ABP calls CompleteAsnyc method. In this stiuation if any error occurs (like below), background jobs are created and our operations are (on business related tables) rollbacked. How can we make background job work in the same transaction with our business code; so it will not created or rolledback when we get any error on method completion (CompleAsync)

[ERR] The operation was canceled.
System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Npgsql.Internal.NpgsqlConnector.<StartUserAction>g__DoStartUserAction|257_0(<>c__DisplayClass257_0& )
   at Npgsql.Internal.NpgsqlConnector.StartUserAction(ConnectorState newState, NpgsqlCommand command, CancellationToken cancellationToken, Boolean attemptPgCancellation)
   at Npgsql.NpgsqlTransaction.Commit(Boolean async, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CommitAsync(CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.CommitAsync(CancellationToken cancellationToken)
   at Volo.Abp.Uow.EntityFrameworkCore.EfCoreTransactionApi.CommitAsync()
   at Volo.Abp.Uow.UnitOfWork.CommitTransactionsAsync()
   at Volo.Abp.Uow.UnitOfWork.CompleteAsync(CancellationToken cancellationToken)
   at Volo.Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
   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)

  • Steps to reproduce the issue:"
[UnitOfWork(true)]
        public async Task CreateAsync()
        {
            await productRepository.InsertAsync(new Product("Product1"));
            await CurrentUnitOfWork.SaveChangesAsync();
            await backgroundJobManager.EnqueueAsync(ProductJobArgs);
        }

Hi liangshiwei,

Send an email

Showing 11 to 20 of 43 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11