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

Cannot build Cluster with LoggingMeter disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.5.1
    • 3.5.0
    • library
    • 0

    Description

      If LoggingMeterOptions is configured with Enabled set to false then the cluster fails to initialize altogether. This was introduced in 3.5.0 because the internal NoopMeter class constructor was changed to private to ensure use of the singleton and the BuildServiceProvider registration code doesn't use that singleton.

      System.InvalidOperationException: Sequence contains no elements
         at System.Linq.ThrowHelper.ThrowNoElementsException()
         at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
         at Couchbase.Core.DI.SingletonServiceFactory.CreateFactory(Type implementationType)
         at Couchbase.Core.DI.SingletonServiceFactory..ctor(Type implementationType)
         at Couchbase.ClusterOptions.AddService[TService,TImplementation](ClusterServiceLifetime lifetime)
         at Couchbase.ClusterOptionsExtensions.AddClusterService[TService,TImplementation](ClusterOptions clusterOptions)
         at Couchbase.ClusterOptions.BuildServiceProvider()
         at Couchbase.Core.ClusterContext..ctor(ICluster cluster, CancellationTokenSource tokenSource, ClusterOptions options)
         at Couchbase.Cluster..ctor(ClusterOptions clusterOptions)
         at Couchbase.Cluster.ConnectAsync(ClusterOptions options)
         at Couchbase.Extensions.DependencyInjection.Internal.ClusterProvider.GetBucketFromClusterAsync(String bucketName)
         at Phoenix.HealthChecks.Couchbase.Extensions.CouchbaseHealthCheck`1.CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken)
      

      Attachments

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

        Activity

          People

            btburnett3 Brant Burnett
            btburnett3 Brant Burnett
            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