Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-3417

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.4.9
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              richard.ponton Richard Ponton
              richard.ponton Richard Ponton
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty