Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.9.1.1] bug IRepository.GetAllList() on sqlite #1058

Closed
dawsidious opened this issue May 27, 2016 · 4 comments
Closed

[0.9.1.1] bug IRepository.GetAllList() on sqlite #1058

dawsidious opened this issue May 27, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@dawsidious
Copy link

dawsidious commented May 27, 2016

Hi there !

I have encoutered a regresion with 0.9.1.1.

I use GetAllList() to retrieve 160.000 records from an IRepository connected to a sqlite db.

With 0.9.1.0 and previous versions, it took 1-2 seconds.
With 0.9.1.1 it runs without any response, even after few minutes.
It never get back the list.

GetCount() method still works fine.

Tests with 0.9.1.0

var a = _pathsRepository.Count();
var b = _pathsRepository.GetAll().FirstOrDefault();
var c = _pathsRepository.GetAllList();
var d = await _pathsRepository.GetAllListAsync();

response

a = 160000
b = 1st of the list
c = List of 160000 paths (+/- 1 second)
d = List of 160000 paths (+/- 1 second)

Tests with 0.9.1.1

var a = _pathsRepository.Count();
var b = _pathsRepository.GetAll().FirstOrDefault();
var c = _pathsRepository.GetAllList();
var d = await _pathsRepository.GetAllListAsync();

response

a = 160000
b = 1st of the list
c = ... ==> infinite time; never end.
d = ... ==> infinite time; never end.

[UnitOfWork(false)] is set on my method, since sqlite require it.
It's working fine on 0.9.1.0

Any idea of a change on this release which could cause that ? :)

I reverted back to 0.9.1.0 ABP.* (no other package) and it works again.

@hikalkan hikalkan added this to the ABP v0.9.2 milestone May 27, 2016
@hikalkan
Copy link
Member

Hi,

The only significiant change is here: v0.9.1.0...v0.9.1.1#diff-4ff9ae44e68e35ab1df34e2b9e650913R214

We added dbContext.Entry(e.Entity).State = previousState since it was causing this issue: #1042

It seems this gets time. We will test it with a big data to see the result and will make some optimization if possible, or make ObjectContext_ObjectMaterialized optional.

Thanks for informing us.

@dawsidious
Copy link
Author

Additionnal info for testing:

  • due to Entry state like you specified; this is not related to a specific db. (testing on sql server is fine)
  • when I say a lot of data... Before, I used GetAllList to retrieve 16.200.000 entities (sql server) within few seconds.

--> In this case I don't need any entry state since these data are read-only for calculs.

thks for the help :)

@natiki
Copy link
Contributor

natiki commented May 31, 2016

FWIW I believe this regression also affects SQL Server. We have some tests that do a IRepository.GetAll() on a table that has ~215,000 records. Test was passing fine prior to upgrade to 0.9.1.1 at which point the test never seems to return the list even when left for a few minutes.

UPDATE: I have rolled back to 0.9.1.0 and the problem goes away for me as well. i.e. Calls to GetAll() including the one described above now return as expected.

@dawsidious
Copy link
Author

yup my bad; I didn't explained clearly when I said :
•due to Entry state like you specified; this is not related to a specific db. (testing on sql server is fine)

I would said that i can reproduce the same performanc error on sql server. so yeah, it affects every db (sql server, sqlite, oracle ... :) )

KenProDev pushed a commit to KenProDev/aspnetboilerplate that referenced this issue Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants