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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

            Assignee:
            Unassigned
            Reporter:
            Andrew Shuvalov (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: