-
Notifications
You must be signed in to change notification settings - Fork 307
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
Add stress test with many indexes #462
Comments
50k entities is not much. We tested with millions. Do you have some reproducible test case? |
I do not have any test case yet as I am still in development. I noticed that the number of entries is ~2M (From BoxStore.diagnose()), does it equal the number of records? Anyway, I removed some indexes and relations from some entities, the database size was greatly reduced and no hang was observed. |
Indexes influence the number of entries directly; 1 per index per entity. |
Previously I had 20++ indexes and now 10 indexes. It hanged forever, i.e. no response at all (tried to wait for more than 10 minutes). Maybe need to know what is the possible cause to make nativeBeginTx hang when data size is large? |
There should be no reason to hang, just to slow down. We could set up a stress test on our side using a lot of index properties. |
Issue Basics
Description
I found that when I have many data (>50,000 records) in the database, write operation ( Box.put(), Box.removeAll(), etc. ) will hang forever. However, read operation still works. After debugging, I found that "nativeBeginTx()" (in BoxStore.java) or "nativeDeleteAll" (in Cursor.java) method call never ended. Is there any additional setup for large data application?
My BoxStore.diagnose() result (called before write operation):
pid thread txnid
8875 b774fc00 -
8875 99c3a930 -
8875 a00ba930 -
8875 8c800930 -
entries=1988217
depth=4
branch-pages=466
leaf-pages=43826
overflow-pages=8
page-size=4096
last-page-number=48054
last-tx-id=3863
size=10737418240
max-readers=500
readers=4
Setup
mBoxStore = MyObjectBox.builder().androidContext( this ).maxSizeInKByte( MAX_DB_SIZE_KB ).maxReaders( MAX_NUM_DB_READERS ).build();
Debug
The text was updated successfully, but these errors were encountered: