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

Reactive KeyManagementService doesn't free resources

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.12.5, 4.0.4
    • Affects Version/s: None
    • Component/s: Reactive Streams
    • Labels:
      None

      com.mongodb.internal.async.client.KeyManagementService constructs a {{ TlsChannelStreamFactoryFactory}} but never closes it. This class is expensive because every instance starts a thread (or maybe two). It slows down our tests a lot because every FLE spec test creates one of these, so by the end there are hundreds.

      This can be fixed by making it Closeable and calling close from Crypt.close().

      At the same time we should update com.mongodb.reactivestreams.client.ClientSideEncryptionTest and org.mongodb.scala.ClientSideEncryptionTest to close the MongoClient instance they own.

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

              Created:
              Updated:
              Resolved: