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

ChangeStream cursor raises resumable exception when there is no event since last replica set election

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.1
    • Affects Version/s: None
    • Component/s: Operations
    • None

      See jeff.yemin's analysis in https://jira.mongodb.org/browse/JAVA-2858
      There may be a similar problem in ChangeStreamCusor.cs

      Relevant snippet from ChangeStreamCursor.cs:

      
              public bool MoveNext(CancellationToken cancellationToken = default(CancellationToken))
              {
                  bool hasMore;
                  try
                  {
                      hasMore = _cursor.MoveNext(cancellationToken);
                  }
                  catch (Exception ex)
                  {
                      if (RetryabilityHelper.IsResumableChangeStreamException(ex))
                      {
                          _cursor = _changeStreamOperation.Resume(_binding, _resumeToken, cancellationToken);
                          hasMore = _cursor.MoveNext(cancellationToken);
                      }
                      else
                      {
                          throw;
                      }
                  }
      
                  ProcessBatch(hasMore);
                  return hasMore;
              }
      
      
      
      

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            vincent.kam@mongodb.com Vincent Kam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: