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

Fix snappy compression

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.2
    • Component/s: Wire Protocol
    • Labels:
      None
    • Case:

      Description

      The below repo with turned on `snappy` compression:

                var m = new MongoClient("mongodb://localhost?compressors=snappy");
                var coll = m.GetDatabase("test").GetCollection<BsonDocument>("foo");
                coll.InsertOne(BsonDocument.Parse("{x:1}"));
      

      throws the server exception:

      DBException handling request, closing client connection: BadValue: Compressed message was invalid or corrupted
      

      Probably it's something about the difference in the format of `snappy` headers which are expected by the server and format which we use in the driver.

      NOTE: currently `snappy` is disabled in `evergreen.yml`. It should be turned on. However when I did it, all tests related to `snappy` task passed: https://evergreen.mongodb.com/version/5d3ebf440ae6067c15be8da9
      Perhaps it's not enough just to uncomment the snappy lines from here: https://github.com/mongodb/mongo-csharp-driver/blob/master/evergreen/evergreen.yml#L483. It should be also investigated.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: