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.
Attachments
Issue Links
For Gerrit Dashboard: NCBC-3417 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
193143,7 | NCBC-3417: MutateIn possibly modifies global Transcoder.Serializer | master | couchbase-net-client | Status: MERGED | +2 | +1 |