Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4093

"com.mongodb.MongoException: state should be: open" when concurrently accessing the client for HELP repro

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      The attached short repro is a simplified version of a stress test. In short, it just creates an array of MongoClient instances and is using them concurrently from other threads. This fails with "state should be: open" right at the first read.

      The sharded cluster backend should be any version of v4.0 branch, like 4.0.23.

      The Java driver could be 3.10.2, which is used by customer, but could be anything that works, initially. The versions I tried are in pom.xml - 3.10.2, 3.12.8, 4.0.6, 4.2.2.

      Attachments

        1. ConcurrentRepro.java
          7 kB
        2. pom.xml
          2 kB

        Activity

          People

            Unassigned Unassigned
            andrew.shuvalov@mongodb.com Andrew Shuvalov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: