Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4052

Move SRV / TXT resolution code to a separate file

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Trivial - P5 Trivial - P5
    • None
    • None
    • None

    Description

      Motivation
      There are several functions related to SRV / TXT lookup in mongoc-client.c. They do not depend on mongoc_client_t. SRV / TXT lookup is called by calling _mongoc_client_get_rr in mongoc-topology.c.

      In CDRIVER-4048, some symbols for SRV / TXT lookup were added to mongoc-topology-private.h to permit overriding the DNS resolver: _mongoc_rr_resolver_fn, mongoc_rr_data_t, and mongoc_rr_type_t.

      mongoc-topology.c and mongoc-client.c are large files. Moving SRV / TXT code to a separate file should help readability.

      Scope
      Move MONGOC_RR_DEFAULT_BUFFER_SIZE and _mongoc_client_get_rr, and the related static methods to a new file. This could be named mongoc-dns.c, or mongoc-rr.c. If rr is the name chosen, ensure that it is clearly defined (to be "resource record" I believe).

      Attachments

        Activity

          People

            Unassigned Unassigned
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: