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

io.objectbox.exception.DbMaxReadersExceededException #874

Closed
YukaiXin opened this issue Jul 1, 2020 · 2 comments
Closed

io.objectbox.exception.DbMaxReadersExceededException #874

YukaiXin opened this issue Jul 1, 2020 · 2 comments

Comments

@YukaiXin
Copy link

YukaiXin commented Jul 1, 2020

#764 Issue Basics

  • ObjectBox version (are using the latest version?): 2.5.1
  • Reproducibility: always

Reproducing the bug

Description

When there is a lot of commodity data in the database, this problem will appear in multi thread search of commodities

Code

threadExecutors.execute(new Runnable() { @Override public void run() { /** **/ list = SqliteProductManager.getInstance().findProducts(ALL_PRODUCT_TYPE, queryText); } catch (Exception e) { e.printStackTrace(); } } });

`public List findProducts(ProductQueryParams queryParams){
long startTime = System.currentTimeMillis();
QueryBuilder query = productModelBox.query();

    boolean isSearch = queryParams.seachText != null && queryParams.seachText.length() > 0;
    if(isSearch){
        String seachText = queryParams.seachText.toUpperCase();
        long longVal = -1;
        try {
            longVal = Long.parseLong(seachText);
        } catch (Exception e) {
            longVal = -1;
        }
        query.contains(ProductModel_.goodsNameFullEn,seachText)
                .or().contains(ProductModel_.goodsNameEn,seachText)
                .or().contains(ProductModel_.goodsDesc,seachText)

        ;
        if(longVal  > 0 ){
            query.or().startsWith(ProductModel_.barCode,seachText);
            query.or().equal(ProductModel_.goodsId,longVal);
        }else{
            query.or().contains(ProductModel_.barCode,seachText);
        }

    }
    List<ProductModel> list = new ArrayList<>();
    String txt = "商品搜索 ";
    try {
        list = query.order(ProductModel_.goodsSn).build().find();
    }catch (Exception e){
        e.printStackTrace();
        txt += " 异常 :"+e.getMessage();
    }finally {
        XLog.i(txt+"  Thread name  : "+Thread.currentThread().getName());
    }

    return list;
}`

Logs & stackstraces

#1

pool-2-thread-5(32080)

io.objectbox.exception.DbMaxReadersExceededException
Could not begin read transaction (maximum of read transactions reached)
1 io.objectbox.BoxStore.nativeBeginReadTx(Native Method)--
2 io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
3 io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
4 io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
5 io.objectbox.query.Query.callInReadTx(Query.java:293)
6 io.objectbox.query.Query.find(Query.java:206)
7 com.fuiou.pay.saas.manager.SqliteProductManager$2.run(SqliteProductManager.java:1183)
8 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
9 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
10 java.lang.Thread.run(Thread.java:761)

#2
could not begin read transaction (maximum of read transactions reached) (error code -30790)

106-30 20:05:59.774 22919 3378 W System.err: at io.objectbox.BoxStore.nativeBeginReadTx(Native Method)
206-30 20:05:59.774 22919 3378 W System.err: at io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
306-30 20:05:59.774 22919 3378 W System.err: at io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
406-30 20:05:59.774 22919 3378 W System.err: at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
506-30 20:05:59.774 22919 3378 W System.err: at io.objectbox.query.Query.callInReadTx(Query.java:293)
606-30 20:05:59.774 22919 3378 W System.err: at io.objectbox.query.Query.find(Query.java:206)
706-30 20:05:59.774 22919 3378 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:635)
806-30 20:05:59.774 22919 3378 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:586)
906-30 20:05:59.774 22919 3378 W System.err: at com.fuiou.pay.saas.fragment.product.BaseProductTypeFragment$3.run(BaseProductTypeFragment.java:291)
1006-30 20:05:59.775 22919 3378 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
1106-30 20:05:59.775 22919 3378 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
1206-30 20:05:59.775 22919 3378 W System.err: at java.lang.Thread.run(Thread.java:761)
1306-30 20:06:01.435 22919 3380 E Box : Storage error code -30790
1406-30 20:06:01.440 22919 3380 W System.err: io.objectbox.exception.DbMaxReadersExceededException: Could not begin read transaction (maximum of read transactions reached) (error code -30790)
1506-30 20:06:01.441 22919 3380 W System.err: at io.objectbox.BoxStore.nativeBeginReadTx(Native Method)
1606-30 20:06:01.441 22919 3380 W System.err: at io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
1706-30 20:06:01.441 22919 3380 W System.err: at io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
1806-30 20:06:01.441 22919 3380 W System.err: at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
1906-30 20:06:01.441 22919 3380 W System.err: at io.objectbox.query.Query.callInReadTx(Query.java:293)
2006-30 20:06:01.441 22919 3380 W System.err: at io.objectbox.query.Query.find(Query.java:206)
2106-30 20:06:01.441 22919 3380 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:635)
2206-30 20:06:01.441 22919 3380 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:574)
2306-30 20:06:01.441 22919 3380 W System.err: at com.fuiou.pay.saas.fragment.product.BaseProductTypeFragment$3.run(BaseProductTypeFragment.java:298)
2406-30 20:06:01.441 22919 3380 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
2506-30 20:06:01.441 22919 3380 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
2606-30 20:06:01.441 22919 3380 W System.err: at java.lang.Thread.run(Thread.java:761)
2706-30 20:06:04.087 22919 3382 E Box : Storage error code -30790
2806-30 20:06:04.094 22919 3382 W System.err: io.objectbox.exception.DbMaxReadersExceededException: Could not begin read transaction (maximum of read transactions reached) (error code -30790)
2906-30 20:06:04.094 22919 3382 W System.err: at io.objectbox.BoxStore.nativeBeginReadTx(Native Method)
3006-30 20:06:04.094 22919 3382 W System.err: at io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
3106-30 20:06:04.094 22919 3382 W System.err: at io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
3206-30 20:06:04.094 22919 3382 W System.err: at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
3306-30 20:06:04.094 22919 3382 W System.err: at io.objectbox.query.Query.callInReadTx(Query.java:293)
3406-30 20:06:04.094 22919 3382 W System.err: at io.objectbox.query.Query.find(Query.java:206)
3506-30 20:06:04.094 22919 3382 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:635)
3606-30 20:06:04.094 22919 3382 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:586)
3706-30 20:06:04.094 22919 3382 W System.err: at com.fuiou.pay.saas.fragment.product.BaseProductTypeFragment$3.run(BaseProductTypeFragment.java:291)
3806-30 20:06:04.095 22919 3382 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
3906-30 20:06:04.095 22919 3382 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
4006-30 20:06:04.095 22919 3382 W System.err: at java.lang.Thread.run(Thread.java:761)
4106-30 20:06:07.538 22919 3384 E Box : Storage error code -30790
4206-30 20:06:07.545 22919 3384 W System.err: io.objectbox.exception.DbMaxReadersExceededException: Could not begin read transaction (maximum of read transactions reached) (error code -30790)
4306-30 20:06:07.546 22919 3384 W System.err: at io.objectbox.BoxStore.nativeBeginReadTx(Native Method)
4406-30 20:06:07.546 22919 3384 W System.err: at io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
4506-30 20:06:07.546 22919 3384 W System.err: at io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
4606-30 20:06:07.546 22919 3384 W System.err: at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
4706-30 20:06:07.546 22919 3384 W System.err: at io.objectbox.query.Query.callInReadTx(Query.java:293)
4806-30 20:06:07.546 22919 3384 W System.err: at io.objectbox.query.Query.find(Query.java:206)
4906-30 20:06:07.546 22919 3384 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:635)
5006-30 20:06:07.546 22919 3384 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:574)
5106-30 20:06:07.546 22919 3384 W System.err: at com.fuiou.pay.saas.fragment.product.BaseProductTypeFragment$3.run(BaseProductTypeFragment.java:298)
5206-30 20:06:07.546 22919 3384 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
5306-30 20:06:07.546 22919 3384 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
5406-30 20:06:07.546 22919 3384 W System.err: at java.lang.Thread.run(Thread.java:761)
5506-30 20:06:08.100 22919 3378 E Box : Storage error code -30790
5606-30 20:06:08.107 22919 3378 W System.err: io.objectbox.exception.DbMaxReadersExceededException: Could not begin read transaction (maximum of read transactions reached) (error code -30790)
5706-30 20:06:08.107 22919 3378 W System.err: at io.objectbox.BoxStore.nativeBeginReadTx(Native Method)
5806-30 20:06:08.107 22919 3378 W System.err: at io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
5906-30 20:06:08.107 22919 3378 W System.err: at io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
6006-30 20:06:08.107 22919 3378 W System.err: at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
6106-30 20:06:08.107 22919 3378 W System.err: at io.objectbox.query.Query.callInReadTx(Query.java:293)
6206-30 20:06:08.107 22919 3378 W System.err: at io.objectbox.query.Query.find(Query.java:206)
6306-30 20:06:08.107 22919 3378 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:635)
6406-30 20:06:08.107 22919 3378 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:574)
6506-30 20:06:08.107 22919 3378 W System.err: at com.fuiou.pay.saas.fragment.product.BaseProductTypeFragment$3.run(BaseProductTypeFragment.java:298)
6606-30 20:06:08.107 22919 3378 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
6706-30 20:06:08.107 22919 3378 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
6806-30 20:06:08.107 22919 3378 W System.err: at java.lang.Thread.run(Thread.java:761)
6906-30 20:06:08.934 22919 3380 E Box : Storage error code -30790
7006-30 20:06:08.941 22919 3380 W System.err: io.objectbox.exception.DbMaxReadersExceededException: Could not begin read transaction (maximum of read transactions reached) (error code -30790)
7106-30 20:06:08.941 22919 3380 W System.err: at io.objectbox.BoxStore.nativeBeginReadTx(Native Method)
7206-30 20:06:08.941 22919 3380 W System.err: at io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
7306-30 20:06:08.941 22919 3380 W System.err: at io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
7406-30 20:06:08.941 22919 3380 W System.err: at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
7506-30 20:06:08.941 22919 3380 W System.err: at io.objectbox.query.Query.callInReadTx(Query.java:293)
7606-30 20:06:08.941 22919 3380 W System.err: at io.objectbox.query.Query.find(Query.java:206)
7706-30 20:06:08.941 22919 3380 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:635)
7806-30 20:06:08.941 22919 3380 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:574)
7906-30 20:06:08.942 22919 3380 W System.err: at com.fuiou.pay.saas.fragment.product.BaseProductTypeFragment$3.run(BaseProductTypeFragment.java:298)
8006-30 20:06:08.942 22919 3380 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
8106-30 20:06:08.942 22919 3380 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
8206-30 20:06:08.942 22919 3380 W System.err: at java.lang.Thread.run(Thread.java:761)
8306-30 20:06:15.023 22919 23207 I NetPrintStatusManager: [NetPrintSatusModel{networkTicketPrint=_ticket 网络小票打印机 null 非中心服务器 直连打印, isShowTitle=false}]
8406-30 20:06:15.023 22919 22919 I NavHomeLayoutAction: netPrintNotUseCount=0
8506-30 20:06:16.315 22919 3382 E Box : Storage error code -30790
8606-30 20:06:16.321 22919 3382 W System.err: io.objectbox.exception.DbMaxReadersExceededException: Could not begin read transaction (maximum of read transactions reached) (error code -30790)
8706-30 20:06:16.321 22919 3382 W System.err: at io.objectbox.BoxStore.nativeBeginReadTx(Native Method)
8806-30 20:06:16.321 22919 3382 W System.err: at io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
8906-30 20:06:16.321 22919 3382 W System.err: at io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
9006-30 20:06:16.321 22919 3382 W System.err: at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
9106-30 20:06:16.321 22919 3382 W System.err: at io.objectbox.query.Query.callInReadTx(Query.java:293)
9206-30 20:06:16.321 22919 3382 W System.err: at io.objectbox.query.Query.find(Query.java:206)
9306-30 20:06:16.321 22919 3382 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:635)
9406-30 20:06:16.321 22919 3382 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:586)
9506-30 20:06:16.321 22919 3382 W System.err: at com.fuiou.pay.saas.fragment.product.BaseProductTypeFragment$3.run(BaseProductTypeFragment.java:291)
9606-30 20:06:16.322 22919 3382 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
9706-30 20:06:16.322 22919 3382 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
9806-30 20:06:16.322 22919 3382 W System.err: at java.lang.Thread.run(Thread.java:761)
9906-30 20:06:20.869 22919 3384 E Box : Storage error code -30790
10006-30 20:06:20.874 22919 3384 W System.err: io.objectbox.exception.DbMaxReadersExceededException: Could not begin read transaction (maximum of read transactions reached) (error code -30790)
10106-30 20:06:20.875 22919 3384 W System.err: at io.objectbox.BoxStore.nativeBeginReadTx(Native Method)
10206-30 20:06:20.875 22919 3384 W System.err: at io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
10306-30 20:06:20.875 22919 3384 W System.err: at io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
10406-30 20:06:20.875 22919 3384 W System.err: at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
10506-30 20:06:20.875 22919 3384 W System.err: at io.objectbox.query.Query.callInReadTx(Query.java:293)
10606-30 20:06:20.875 22919 3384 W System.err: at io.objectbox.query.Query.find(Query.java:206)
10706-30 20:06:20.875 22919 3384 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:635)
10806-30 20:06:20.875 22919 3384 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:574)
10906-30 20:06:20.875 22919 3384 W System.err: at com.fuiou.pay.saas.fragment.product.BaseProductTypeFragment$3.run(BaseProductTypeFragment.java:298)
11006-30 20:06:20.875 22919 3384 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
11106-30 20:06:20.875 22919 3384 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
11206-30 20:06:20.875 22919 3384 W System.err: at java.lang.Thread.run(Thread.java:761)
11306-30 20:06:22.008 22919 3378 E Box : Storage error code -30790
11406-30 20:06:22.013 22919 3378 W System.err: io.objectbox.exception.DbMaxReadersExceededException: Could not begin read transaction (maximum of read transactions reached) (error code -30790)
11506-30 20:06:22.014 22919 3378 W System.err: at io.objectbox.BoxStore.nativeBeginReadTx(Native Method)
11606-30 20:06:22.014 22919 3378 W System.err: at io.objectbox.BoxStore.beginReadTx(BoxStore.java:414)
11706-30 20:06:22.014 22919 3378 W System.err: at io.objectbox.BoxStore.callInReadTx(BoxStore.java:756)
11806-30 20:06:22.014 22919 3378 W System.err: at io.objectbox.BoxStore.callInReadTxWithRetry(BoxStore.java:704)
11906-30 20:06:22.014 22919 3378 W System.err: at io.objectbox.query.Query.callInReadTx(Query.java:293)
12006-30 20:06:22.014 22919 3378 W System.err: at io.objectbox.query.Query.find(Query.java:206)
12106-30 20:06:22.014 22919 3378 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:635)
12206-30 20:06:22.014 22919 3378 W System.err: at com.fuiou.pay.saas.manager.SqliteProductManager.findProducts(SqliteProductManager.java:574)
12306-30 20:06:22.014 22919 3378 W System.err: at com.fuiou.pay.saas.fragment.product.BaseProductTypeFragment$3.run(BaseProductTypeFragment.java:298)
12406-30 20:06:22.014 22919 3378 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
12506-30 20:06:22.014 22919 3378 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
12606-30 20:06:22.014 22919 3378 W System.err: at java.lang.Thread.run(Thread.java:761)
12706-30 20:06:25.908 22919 22919 I System.out: 1011
12806-30 20:06:25.908 22919 22919 I System.out: 1011
12906-30 20:06:25.909 22919 22919 I System.out: 1011
13006-30 20:06:25.909 22919 22919 I System.out: 1011
13106-30 20:06:25.909 22919 22919 I System.out: 1011
13206-30 20:06:25.910 22919 22919 I System.out: 1011
13306-30 20:06:25.911 22919 22919 I System.out: 1011
13406-30 20:06:25.912 22919 22919 I System.out: 1011
13506-30 20:06:25.912 22919 22919 I System.out: 1011
13606-30 20:06:25.913 22919 22919 I System.out: 1011
13706-30 20:06:25.913 22919 22919 I System.out: 1011
13806-30 20:06:25.914 22919 22919 I System.out: 1011
13906-30 20:06:25.915 22919 22919 I System.out: 1011
14006-30 20:06:25.915 22919 22919 I System.out: 1011
14106-30 20:06:25.916 22919 22919 I System.out: 1011
14206-30 20:06:25.916 22919 22919 I System.out: 1011
14306-30 20:06:25.917 22919 22919 I System.out: 1011
14406-30 20:06:25.918 22919 22919 I System.out: 1011
14506-30 20:06:25.918 22919 22919 I System.out: 1011
14606-30 20:06:25.919 22919 22919 I System.out: 1011
14706-30 20:06:25.975 22919 22919 W IInputConnectionWrapper: finishComposingText on inactive InputConnection
14806-30 20:06:26.013 22919 23001 I System.out: true
14906-30 20:06:26.062 22919 22929 I art : Background sticky concurrent mark sweep GC freed 107892(13MB) AllocSpace objects, 39(1180KB) LOS objects, 18% free, 62MB/76MB, paused 7.310ms total 88.712ms

Entities

`@Entity
public class ProductModel extends DBBaseModel{

private static final String TAG = "ProductModel";
@Id(assignable = true)
private long goodsId = 0l;//|int(11) 商品Id
private long parentGoodsId = 0l;  //父商品Id(如该商品为父商品,则为0)
private String confSpecGoods = DataConstants.OnOff.OFF;  //是否配置规格商品 0:否 1:是(默认0)
private long relateGoodsId = 0l;
private String barCode; //条码
private String goodsName;//|string	 商品名称
private String updateTime; //更新商品时间
private String takeOut;//|string(2) 外卖状态, 00:不支持, 01:支持       0:不支持, 01:支持
private String sellState;//|string(2) 可售状态, 00:不可以,01:可以       00:不可以,01:可以
private String isSellOut = DataConstants.OnOff.OFF; /**是否沽清 1:是,0:否*/
@Transient
private long price = 0l;//int(11) 商品价格以分为单位
@Transient
@Expose(deserialize = false,serialize = false)
private double costPrice = 0; //进货成本价
private String goodsDesc;//|string	 商品描述
@Transient
@Expose(deserialize = false,serialize = false)
private double purchasePrice = 0; // 进货价
@Transient
private long discountPrice = 0l;//	|int(11)		|			|商品折扣价格以分为单位
@Transient
private String goodsPicBig;//		String			商品大图
@Transient
private String goodsPicMiddle;//	String			商品中图
@Transient
private String goodsPicTiny = "";//	String			商品小图
/** 是否临时菜 0:否 1:是 **/
private String tempGoods = DataConstants.OnOff.OFF;
private Double goodsCount = 0.0 ;//  |int(11) 商品数量
private long specRelateCount = 0l;//	|int(11) 菜品规格数量

// @transient
// @expose(deserialize = false,serialize = false)
private boolean hasSpecRelate;// |boolean 是否有菜品规格(true:有,false:没有)规格(true:有,false:没有)
private String eatInState;//|string 是否支持堂食00:否,01:是 0:否,01:是
private String markPrint;
private long goodsSn = 0l; //排序
/** 库存类型 01: 扣减商品自身库存,02:扣减配方库存*/
private String stockType;
/** 库存单位 kg:千克 ,g:克 ,num:个数,copy:份数,cup:杯数*/
private String stockUnit = "";
/** 是否可用于售卖 1:能,0:不能*/
private String isSellGoods;
/** 是否可作为配方 1:能,0:不能*/
private String isFormulaGoods;
/** 商品是否有配方 01: 没有,02:有*/
private String hasFormula;
/商品名称简拼/
private String goodsNameEn;
/商品名称全拼/
private String goodsNameFullEn;
/
是否自采购 1:是 0:否 ,如果是0的话,进货,调货都不可见,只有退货和订货可见 /
private String isOwnPurchase;
/是否为套餐商品,0:不是,1:是/
private String isPackageGoods;
/
是否启用保质期 0 否 1是 /
private String isShelfLife;
/
是否时价菜 0:否 1:是 /
private String isChangePrice;
/
* 可拆分原材料 01:不可 02:可 **/
private String hasSplitFormula;
/*是否为加油站商品 01 是/
private String specialGoodsType = "";

/** 主规格商品id **/
@Transient
private long mainSpecGoodsId = -1;
/**
 *规格商品是否有库存换算 0:否 1:是
 */
@Transient
private String hasSpecStockConvert;
/**
 *格商品库存换算值
 */
@Transient
private double specStockConvert;
/**
 *原材料规格 字段
 */
@Transient
private String formulaSpec;
/**
 *是否主规格商品 0:否 1:是
 */
@Transient
private String isMainSpecGoods;

/**批发价*/
@Transient
private double wholesalePrice = 0;
/**起批份数*/
@Transient
private double batchNumber = 0;

/**是否支持批发 0:否 1:是*/
@Transient
private String supportWholesale = DataConstants.OnOff.OFF;

// 基础表
@Expose(deserialize = false,serialize = false)
private String json;
/** 库存单位  kg:千克 ,g:克 ,num:个数,copy:份数,cup:杯数*/
@Transient
@Expose(deserialize = false,serialize = false)
private String stockZhUnit = "";
@Transient
@Expose(deserialize = false,serialize = false)
private List<ProductSpecModel> specList;
@Transient
@Expose(deserialize = false,serialize = false)
private Map<Long,List<SpecItemModel>> selectSpecItems;
@Transient
@Expose(deserialize = false,serialize = false)
private String uuid;
@Transient
@Expose(deserialize = false,serialize = false)
private String simpleUUID = "";
@Transient
@Expose(deserialize = false,serialize = false)
private String productSpecName;

@Transient
@Expose(deserialize = false,serialize = false)
private long[] typeIdArray;
@Transient
@Expose(deserialize = false,serialize = false)
private String typeId;
@Transient
@Expose(deserialize = false,serialize = false)
private long cashierDisAmt = -1l; //收银员手动打折金额
@Transient
@Expose(deserialize = false,serialize = false)
private double cashierDiscount = 100; //收银员手动折扣  70%  传递 70
@Transient
@Expose(deserialize = false,serialize = false)
private long totalCashierDisAmt = 0l; //商品总价
@Transient
@Expose(deserialize = false,serialize = false)
private String calcModel = DataConstants.ProductAmtCalc.COUNT_MULTIPLY_PRICE; //计算模式
@Transient
@Expose(deserialize = false,serialize = false)
private long goodsSpecsAmt = 0l; //商品出售价+规格值的价格
@Transient
@Expose(deserialize = false,serialize = false)
private boolean canChangeGoodsSpecsAmt = true; //是否可以修改商品价格
@Transient
@Expose(deserialize = false,serialize = false)
private long memberSpecsAmt = 0l; //会员出售价+规格值的价格
/**是否支持超卖:0:不支持,1:支持*/
@Transient
@Expose(deserialize = false,serialize = false)
private String overSold;

@Transient
@Expose(deserialize = false,serialize = false)
private long detailNo = 0l; //重新下单关联的产品id

@Transient
@Expose(deserialize = false,serialize = false)
private String dishCashierMemo = ""; //下单的备注
@Transient
@Expose(deserialize = false,serialize = false)
private String disDiscountReason = ""; //打折备注

/** 采购单位  kg:千克 ,g:克 ,num:个数,copy:份数,cup:杯数*/
@Transient
@Expose(deserialize = false,serialize = false)
private String goodsPurchaseUnit = "";
/** 采购换算值*/
@Transient
@Expose(deserialize = false,serialize = false)
private double goodsConvertScale = 0d;

/** 库存上限**/
@Transient
@Expose(deserialize = false,serialize = false)
private double stockLimit = 0d;

@Transient
@Expose(deserialize = false,serialize = false)
private double tmpPrice; //临时变价

@Transient
@Expose(deserialize = false,serialize = false)
private Double tmpStockCount; //临时库存 (订货 用到)

@Transient
@Expose(deserialize = false,serialize = false)
private String tmpUnit = ""; //临时单位

@Transient
@Expose(deserialize = false,serialize = false)
private String tmpbatchSsn= "";//临时批次号

@Transient
@Expose(deserialize = false,serialize = false)
private String dishCrtTm; //临时变价

@Transient
@Expose(deserialize = false,serialize = false)
private String dishHasHurried; //催菜0 1

@Transient
@Expose(deserialize = false,serialize = false)
private String dishHasFinish; //是否已上菜 0否,1是

@Transient
@Expose(deserialize = false,serialize = false)
private ProductPromotionModel promotionModel;
@Transient
@Expose(deserialize = false,serialize = false)
private long promotionId = 0;// 商品促销活动参数id
@Transient
@Expose(deserialize = false,serialize = false)
private String goodsPromotionWay = "";//  商品参与促销的方式,1:促销的发起方 2:促销的优惠方;比如买A送B,A为促销的发起方填1,B为优惠方填2
@Transient
@Expose(deserialize = false,serialize = false)
private long memberPrice = 0;
private boolean isWeighGoods = false;
/**商品起点份数*/
@Transient
@Expose(deserialize = false,serialize = false)
private double startSellCopies = 1d;  //起点份数
@Transient
@Expose(deserialize = false,serialize = false)
public boolean isDelete = false;
@Transient
@Expose(deserialize = false,serialize = false)
private boolean isPckProduct = false; //是否为套餐下的商品
@Transient
@Expose(deserialize = false,serialize = false)
private boolean isPckOption = false; //套餐下包含可选商品
@Transient
@Expose(deserialize = false,serialize = false)
private boolean isPkgItemProduct = false; //套餐下规格上的子商品
@Transient
@Expose(deserialize = false,serialize = false)
private String packageGoodsDesc = ""; //套餐的描述

@Transient    /** 商品保质期 **/
@Expose(deserialize = false,serialize = false)
private double shelfLife;
@Transient
@Expose(deserialize = false,serialize = false)
private String goodsPluCode = "";//   商品的plu码
@Transient
@Expose(deserialize = false,serialize = false)
private boolean kitchenPrint = true; //是否后厨打印
@Transient
@Expose(deserialize = false,serialize = false)
private String printId = ""; //使用后厨打印机的序列号

}`

Misc

Is there anything special about your app?
May transactions or multi-threading play a role?
Did you find any workarounds to prevent the issue?

@greenrobot
Copy link
Member

Have you seen this?
https://objectbox.io/docfiles/java/current/io/objectbox/BoxStoreBuilder.html#maxReaders(int)

If you are sure your thread count is legit, you may increase the number of readers.

@greenrobot
Copy link
Member

No further messages, so I assume everything is fine. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants