[CSHARP-3589] Unknown compressor does not log a warning Created: 20/Apr/21  Updated: 22/Jun/22

Status: Blocked
Project: C# Driver
Component/s: Configuration
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: James Kovacs Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on DRIVERS-1204 Easier debugging with standardized lo... Implementing

 Description   

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,))


Generated at Wed Feb 07 21:45:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.