ConfigurationOptions: observe modifications after ConnectionMultiplexer start by NickCraver · Pull Request #2050 · StackExchange/StackExchange.Redis

added 3 commits

March 19, 2022 19:40
- Moves IncludeDetailInExceptions and IncludePerformanceCountersInExceptions from ConnectionMultiplexer to ConfigurationOptions (with backwards compatible APIs).
- Move to a cleaner TryGetTieBreaker approach instead of Sentinel defaults needing to set it.
This needs a suite of tests but basically we're cloning the bits we don't want to fork from RawConfig (ConfigurationOptions ref on ConnectionMultiplexer). This may seem minor, but the net impact is a user can hold on to a ConfigurationOptions passed in and further modify it, e.g. to rotate passwords, etc. upstream. A few things we still clone are called out explicitly in the ConfigurationOptions docs.

@NickCraver

This hasn't worked in some time - properly [Obsolete] it and point to the effective option on SocketManagerOptions.

@NickCraver

@NickCraver NickCraver changed the title ConfigurationOptions: allow modification after ConnectionMultiplexer start ConfigurationOptions: observe modification after ConnectionMultiplexer start

Mar 20, 2022

@NickCraver

@NickCraver

@NickCraver

Cleaning these up for a 3.x move down the road.

philon-msft

@NickCraver NickCraver changed the title ConfigurationOptions: observe modification after ConnectionMultiplexer start ConfigurationOptions: observe modifications after ConnectionMultiplexer start

Mar 21, 2022

mgravell

@NickCraver

NickCraver added a commit that referenced this pull request

Aug 19, 2023
ILogger support - since we support `Action<ConfigurationOptions>` this can be added today e.g. with `o => o.LoggerFactory = myLoggerFactory`:
```cs
var muxer = ConnectionMultiplexer.Connect("localhost", o => o.LoggerFactory = myLoggerFactory);
```
...or we could add sibling overloads to the existing `TextWriter`. I'd love to not create a ^2 matrix every time we do this, though. Starting simpler for that reason. Note: this is on top of #2050 for simplicity, will roll against `main` when merged.