[CSHARP-2267] ChangeStream cursor raises resumable exception when there is no event since last replica set election Created: 10/May/18  Updated: 28/Oct/23  Resolved: 01/Nov/18

Status: Closed
Project: C# Driver
Component/s: Operations
Affects Version/s: None
Fix Version/s: 2.7.1

Type: Bug Priority: Major - P3
Reporter: Vincent Kam (Inactive) Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to JAVA-2858 ChangeStream cursor raises a MongoSoc... Closed

 Description   

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;
        }
 
 



 Comments   
Comment by Githook User [ 06/Nov/18 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-2267: ChangeStream cursor raises resumable exception when there is no event since last replica set election.
Branch: v2.7.x
https://github.com/mongodb/mongo-csharp-driver/commit/45700f7025170f0899bf8726e4435fe6ae8a88db

Comment by Githook User [ 01/Nov/18 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-2267: ChangeStream cursor raises resumable exception when there is no event since last replica set election.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/f9669cd73a35cab0fe9218b3883d3096c5d5e1de

Generated at Wed Feb 07 21:42:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.