Details
-
Bug
-
Resolution: Fixed
-
Critical
-
3.4.8
-
None
-
None
-
3
-
SDK26
Description
CouchbaseCollection.MutateInAsync does the following to copy Serializer from per-operation options.
if (mutation.Transcoder != null && options.SerializerValue != null) |
{
|
mutation.Transcoder.Serializer = options.SerializerValue!;
|
}
|
However, mutation.Transcoder may be a reference to the Singleton-registered OperationConfigurator.JsonTranscoder. So if a call to MutateIn specifies a custom ITypeSerializer in the options, then all future mutation operations will use that ITypeSerializer.
The core of the problem is that nothing registered as a Singleton should be mutable in the first place.