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 Improvement
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      None
    • Backward Breaking:
      Yes
    • # 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
        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
        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 Girbal
        added a comment -

        this change will need to be very explicit in release notes

        Show
        Antoine Girbal
        added a comment - this change will need to be very explicit in release notes
        Hide
        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 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:
              3 years, 7 weeks, 4 days ago
              Date of 1st Reply: