Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3058

Connection string with no compressors overrides compressors specified in MongoClientOptions

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.9.0
    • Affects Version/s: None
    • Component/s: Configuration
    • None

      Consider the following code:

              MongoClientOptions.Builder builder = MongoClientOptions.builder()
                      .compressorList(asList(MongoCompressor.createZlibCompressor()));
      
              MongoClientURI uri = new MongoClientURI("mongodb://localhost/", builder);
      
              System.out.println(builder.build().getCompressorList());
              System.out.println(uri.getOptions().getCompressorList());
      

      The expected output is:

      [MongoCompressor{name='zlib', properties={}}]
      [MongoCompressor{name='zlib', properties={}}]
      

      The actual output is:

      [MongoCompressor{name='zlib', properties={}}]
      []
      

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: