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

Tracing causes System.InvalidOperationException exception when waiting on GetDocumentsAsync<...>(keys);

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.6.1
    • 2.6.0
    • library
    • None
    • 1

    Description

      I’m trying to track down an issue that has appeared since I updated to the latest version of CouchBase 5.5, and the .NET client 2.6.

      var task = bucket.GetDocumentsAsync(keys);
      task.Wait();

      {System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
      at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
      at System.Collections.Generic.List{{1.Enumerator.MoveNextRare() at Couchbase.Tracing.SpanSummary.PopulateSummary(IEnumerable}}1 spans)
      at Couchbase.Tracing.SpanSummary…ctor(Span span)
      at Couchbase.Tracing.ThresholdLoggingTracer.ReportSpan(Span span)
      at Couchbase.Tracing.Span.Finish()
      at Couchbase.Core.Buckets.CouchbaseRequestExecuter.d_12{{1.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Couchbase.CouchbaseBucket.<GetDocumentAsync>d_76}}1.MoveNext()
      — End of stack trace from previous location where exception was thrown —
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Couchbase.CouchbaseBucket.d__76`1.MoveNext()}

      I’m in the process of rolling back the SDK back to 2.5.12 to verify it’s specific to the update, but wanted to see if anyone else has come across this.

      ------------------------2nd message below--------------------

      I was able to eliminate the issue by disabling tracing in .NET 2.6 SDK:

      var configuration = new ClientConfiguration(configurationSection);
      configuration.OperationTracingEnabled = false;
      Cluster cluster = new Cluster(configuration);

       

      Attachments

        Issue Links

          For Gerrit Dashboard: NCBC-1743
          # Subject Branch Project Status CR V

          Activity

            People

              mike.goldsmith Michael Goldsmith
              jmorris Jeff Morris
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty