MutateIn modifies global Transcoder setting, possibly corrupting data for all other operations.

Description

CouchbaseCollection.MutateInAsync does the following to copy Serializer from per-operation options.

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.

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created June 28, 2023 at 12:37 AM
Updated July 20, 2023 at 10:01 PM
Resolved July 20, 2023 at 10:01 PM
Instabug