objectbox / objectbox/objectbox-java

Add stress test with many indexes

オープン
#462 コメント 5 件 リアクション 0 件 担当者 1 名 GitHub で見る

@greenrobot-team がすでに取り組んでいます。

2018年6月14日 から。

主要言語
Java
スター
4.6k
フォーク
311
PR マージ指標
30日以内にマージされた PR はありません

説明

Issue Basics

  • ObjectBox version: 1.5.0
  • Reproducibility: most of the times
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
static final int MAX_NUM_DB_READERS = 500;
static final long MAX_DB_SIZE_KB = 10 * 1024 * 1024;

mBoxStore = MyObjectBox.builder().androidContext( this ).maxSizeInKByte( MAX_DB_SIZE_KB ).maxReaders( MAX_NUM_DB_READERS ).build();

Debug
(Logged from the start of the application, where #4 is box.removeAll() transaction, The number of records in that box is < 300, and it takes forever) 

06-05 03:19:54.030 18382-18425 I/Box: TX #3 (read) ready on thread 9943a930
06-05 03:19:54.043 18382-18425 I/Box: TX #3 recycle
06-05 03:19:54.454 18382-18409 I/Box: TX #4 (write) ready on thread 9fb7f930
06-05 03:20:27.315 18382-18401 I/Box: TX #5 (read) ready on thread 9ffc0930
06-05 03:20:34.070 18382-18401 I/Box: TX #5 is destroyed on thread 9ffc0930...
06-05 03:20:34.070 18382-18401 I/Box: TX #5 destroyed
06-05 03:20:34.869 18382-18401 I/Box: TX #6 (read) ready on thread 9ffc0930
06-05 03:20:34.887 18382-18401 I/Box: TX #6 is destroyed on thread 9ffc0930...
06-05 03:20:34.887 18382-18401 I/Box: TX #6 destroyed
06-05 03:20:39.449 18382-18401 I/Box: TX #7 (write) ready on thread 9ffc0930
06-05 03:20:39.449 18382-18401 I/Box: TX #7 waiting for TX #4 to finish

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。