Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1882

Find throws ArgumentNullException on replica set failover

      When replica set failover ocurs, the running client sometimes receives these exceptions:

      System.ArgumentNullException: Value cannot be null.
      Parameter name: serverVersion
         at MongoDB.Driver.Core.Misc.Ensure.IsNotNull[T](T value, String paramName)
         at MongoDB.Driver.ReadConcern.ThrowIfNotSupported(SemanticVersion serverVersion)
         at MongoDB.Driver.Core.Operations.FindCommandOperation`1.CreateCommand(ServerDescription serverDescription)
         at MongoDB.Driver.Core.Operations.FindCommandOperation`1.ExecuteCommand(IReadBinding binding, ServerDescription serverDescription, CancellationToken cancellationToken)
         at MongoDB.Driver.Core.Operations.FindCommandOperation`1.Execute(IReadBinding binding, CancellationToken cancellationToken)
         at MongoDB.Driver.Core.Operations.FindOperation`1.Execute(IReadBinding binding, CancellationToken cancellationToken)
         at MongoDB.Driver.OperationExecutor.ExecuteReadOperation[TResult](IReadBinding binding, IReadOperation`1 operation, CancellationToken cancellationToken)
         at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IReadOperation`1 operation, ReadPreference readPreference, CancellationToken cancellationToken)
         at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IReadOperation`1 operation, CancellationToken cancellationToken)
         at MongoDB.Driver.MongoCollectionImpl`1.FindSync[TProjection](FilterDefinition`1 filter, FindOptions`2 options, CancellationToken cancellationToken)
      

      A second or two after failover the system returns to normal, so it looks like a race condition.
      The target replica set is running mongodb 3.2.11.

            Assignee:
            Unassigned Unassigned
            Reporter:
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: