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

Choose compressors based on order presented, not order from server reply

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      The OP_COMPRESSED spec states

      When compressing, clients MUST use the first compressor in the client's configured compressors list that is also in the servers list.

      But the compressor to useĀ is retrieved from the server description which is set directly from the isMaster reply. So we always take preference of whatever order the compressors are in the server reply.

      In practice, this may not be an issue currently. As I have not been able to reproduce any case where the server returns compressors in an order different from the client. But if that behavior changes in the future, we'd be using a lower priority compressor than what the client requested.

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

              Created:
              Updated: