[CSHARP-3862] .NET 6.0 RC1: Resume of change stream was not possible, as the resume point may no longer be in the oplog.. Created: 16/Sep/21  Updated: 20/Sep/21  Resolved: 20/Sep/21

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

Type: Bug Priority: Major - P3
Reporter: Brian Buvinghausen Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Driver version 2.13.1 works just fine on .NET 5.0 but as soon as I ported everything over to .NET 6.0 RC1 which dropped on Tuesday and the change streams can no longer resume from the change stream from the tokens.  I reverted back to .NET 5.0 just to verify that the tokens were in fact still in the oplog and it starts back up without any issues so clearly something changed in .NET internals as to how change streams are picked back up.

Problem occurs in both Windows and Linux so it isn't OS specific.

Here is the full stacktrace

MongoDB.Driver.MongoCommandException: Command aggregate failed: Resume of change stream was not possible, as the resume point may no longer be in the oplog..
at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.ProcessResponse(ConnectionId connectionId, CommandMessage responseMessage)
at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.ExecuteAsync(IConnection connection, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Servers.Server.ServerChannel.ExecuteProtocolAsync[TResult](IWireProtocol`1 protocol, ICoreSession session, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.RetryableReadOperationExecutor.ExecuteAsync[TResult](IRetryableReadOperation`1 operation, RetryableReadContext context, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.ReadCommandOperation`1.ExecuteAsync(RetryableReadContext context, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.AggregateOperation`1.ExecuteAsync(RetryableReadContext context, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.ChangeStreamOperation`1.ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)
at MongoDB.Driver.OperationExecutor.ExecuteReadOperationAsync[TResult](IReadBinding binding, IReadOperation`1 operation, CancellationToken cancellationToken)
at MongoDB.Driver.MongoDatabaseImpl.ExecuteReadOperationAsync[T](IClientSessionHandle session, IReadOperation`1 operation, ReadPreference readPreference, CancellationToken cancellationToken)
at MongoDB.Driver.MongoDatabaseImpl.UsingImplicitSessionAsync[TResult](Func`2 funcAsync, CancellationToken cancellationToken)

 

Let me know if you need any additional information/code.



 Comments   
Comment by Jeffrey Yemin [ 20/Sep/21 ]

buvy@assurely.com

Thanks for updating us. I'm going to close this out but please comment back if you have further issues.

Comment by Brian Buvinghausen [ 16/Sep/21 ]

Follow on comment.

When I archived the resume tokens generated from .NET 5 I was able to start the process up.  The resume tokens generated by .NET 6.0 RC1 are capable of being resumed going forwards so I will just be careful shutting down the queue workers and then archiving the tokens and spinning the services back online so ultimately I am not blocked which is the key thing.

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