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

Mongo constructor should not attempt network connections and potentially throw exception that prevents app from starting

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Major Change
    • # Replies:
      3
    • Last comment by Customer:
      true

      Description

      constructors should always remain lean and not block.
      Also we must not prevent the caller's application from starting.
      Client apps will get error when doing operations and handle them as needed.

        Activity

        Hide
        auto auto (Inactive) added a comment -

        Author:

        {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

        Message: JAVA-240: Mongo constructor should not attempt network connections and potentially throw exception that prevents app from starting
        https://github.com/mongodb/mongo-java-driver/commit/a052b4f35af4069121cbf47adc88d6199563c4d4

        Show
        auto auto (Inactive) added a comment - Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'} Message: JAVA-240 : Mongo constructor should not attempt network connections and potentially throw exception that prevents app from starting https://github.com/mongodb/mongo-java-driver/commit/a052b4f35af4069121cbf47adc88d6199563c4d4
        Hide
        antoine Antoine Girbal (Inactive) added a comment -

        this change will need to be very explicit in release notes

        Show
        antoine Antoine Girbal (Inactive) added a comment - this change will need to be very explicit in release notes
        Hide
        brendan Brendan W. McAdams added a comment - - edited

        Should be clearly noted in the Release Notes as we internalize many retry checks that people previously had to write on external code.

        If you are expecting the constructor to fail, and want the application to also fail.... Now your code will not do that.

        Show
        brendan Brendan W. McAdams added a comment - - edited Should be clearly noted in the Release Notes as we internalize many retry checks that people previously had to write on external code. If you are expecting the constructor to fail, and want the application to also fail.... Now your code will not do that.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              4 years, 27 weeks, 1 day ago
              Date of 1st Reply: