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

Fix snappy compression

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

      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.

            Assignee:
            vincent.kam@mongodb.com Vincent Kam (Inactive)
            Reporter:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: