Skip to content

Transactions throw DbMaxReadersExceededException even when there are no active readers  #1000

@MrSlateZB

Description

@MrSlateZB

Describe the bug
When opening transactions in a rapid fashion on multiple threads DbMaxReadersExceededException is often thrown trying to start a transaction. I've created a test in a PR that will recreate this issue despite only allowing one transaction to occur at a time. The issue seems related to running tests on a thread-pool.

I suspect there is some code happening on the native side that is allowing the other transaction tests that do not use thread-pools to succeed despite rapid creation of transactions.

Basic info (please complete the following information):

  • ObjectBox version (are you using the latest version?): 2.9.1
  • Reproducibility: Always (but I suspect this may be machine dependent)
  • Device: Desktop
  • OS: Windows

I have created #999 that adds a test that failed on multiple of my development machines. In this test, we are creating transactions on an unbounded thread pool. However, we are synchronizing each transaction call so, in reality, only 1 transaction should be occurring a time. Despite this, we still receive DbMaxReadersExceededException issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions