Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-314

Gracefully handle errors parsing isMaster responses for SDAM monitoring

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.0.0-rc0
    • None

    Description

      Currently, our code for constructing a ServerDescription for publishing in an SDAM monitoring event assumes the description is well-formed - for ex. that the host-port String is formatted as host:port. 

      We do some force unwrapping, and a lot of casting/field lookups that may silently fail. 

      We might consider refactoring to better handle errors, and decide how we should handle publishing SDAM events where we run into such errors: do we skip them? do we publish them with a missing field? etc. 

      I think the server description parsing could probably also be rewritten to better take advantage of BSONDecoder.

      Attachments

        Issue Links

          Activity

            People

              patrick.freed@mongodb.com Patrick Freed
              kaitlin.mahar@mongodb.com Kaitlin Mahar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: