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

if no server is up the mongo constructor just blocks

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • None
    • 2.11.1
    • None
    • None

    Description

      The java driver now has many wait() around the code that blocks until a server is up.
      For example:

          private synchronized ConnectionStatus getConnectionStatus() {
              if (connectionStatus == null) {
                  try {
                      wait(_mongo.getMongoOptions().getConnectTimeout());
                  } catch (InterruptedException e) {
                      throw new MongoInterruptedException("Interrupted while waiting for next update to dynamic status", e);
                  }
              }
              return connectionStatus;
          }

      This design is surprising because the driver did not block in older version.
      This can prevent the app from starting up.

      Attachments

        Activity

          People

            Unassigned Unassigned
            antoine Antoine Girbal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: