Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3589

Unknown compressor does not log a warning

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Configuration
    • None

      According to the Wire Compression specification:

      Unknown compressors MUST yield a warning, as per the Connection String specification, and MUST NOT be included in the handshake.

      The .NET/C# driver ignores unknown compressors, but does not log a warning as required by the spec.

      To reproduce:

      • Create a MongoClient using the connection string mongodb://localhost:27017/test?compressors=snoopy
      • Observe that no warning is logged even if a trace source is configured

      For comparison, consider the following Python output:

      >>> from pymongo import MongoClient
      >>> client = MongoClient("mongodb://localhost:37017/test?compressors=snoopy")
      /usr/local/lib/python3.9/site-packages/pymongo/compression_support.py:55: UserWarning: Unsupported compressor: snoopy
        warnings.warn("Unsupported compressor: %s" % (compressor,))
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: