- ABP Framework version: v5.3.0
- Project type: Abp Microservice Template
- DB provider: MongoDB
- Steps to reproduce the issue:
- Create new microservice project from abp suite
- Change the database context of all microservices from efcore sqlserver to mongo db by following this steps from: https://docs.abp.io/en/commercial/latest/guides/microservice-mongodb
- Run all services
- Seed product data as many as you like
ProductService.HttpApi.Host
- Adjust the
LimitedResultRequestDto.DefaultMaxResultCount
to a large number e.g.200000 -Use theProductService.HttpApi.Client
for client remote service using WPF -Get the data using the client proxy GetListAsync() multiple times with SkipCount up to TotalCount
There 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});
7 Answer(s)
-
0
Hi,
We will check it.
-
0
Hi,
We will check it.
Hi,
How's it going on?
-
0
Hi, I've spent quite a bit of time on the problem but I'm having trouble reproducing it. I don't think the problem is related to static-proxy, but to confirm my assumption, I need to know if you are facing the same problem when you send a request to product-service via swagger. Also, I would appreciate it if you could provide a minimally reproducible example for healthier tests.
-
0
-
0
Hello again, thank you very much for the information you provided. I tried again with
19064
records, but I couldn't reproduce it again. I'll add more records and try, but I have one more question.What kind of result do you get when you run queries that cover the following situations on the database server? https://www.mongodb.com/docs/compass/current/query/skip/
{"skip": 0, "limit": 1, "batchSize": 2, "sort": { "Name": 1 }}
{"skip": 1, "limit": 1, "batchSize": 2, "sort": { "Name": 1 }}
{"skip": 2, "limit": 1, "batchSize": 2, "sort": { "Name": 1 }}
I need this answer to make sure the problem is not data related.
-
0
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 sameName
, 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. -
0
Thanks for the information, I'm closing it now that the problem is solved.