Change how we pass client settings internally to simplify supporting new settings

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Configuration
    • Java Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      To pass a new client setting (maxAdaptiveRetries) to all operations that execute commands retryable under the read/write retry policies, one needs to change >1000 lines in >100 files. This is unsustainable.

      An obvious solution is that instead of passing individual settings, we could pass the whole MongoClientSettings everywhere any setting is needed. Given that no setting is required, the tests that currently pass only a few individual settings will still be able to do so via MongoClientSettings by setting only the settings of interest.

      This way, supporting a new setting that needs to be accessed as deep as inside of an operation, becomes trivial. However, there will no longer be visibility on what settings are used by a specific class at a point where it is instantiated.

            Assignee:
            Unassigned
            Reporter:
            Valentin Kavalenka
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: