Attempting to use the ChangefeedProcessor library on top of CosmosDB SDK 2.0 results in the following runtime error:
System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Microsoft.Azure.Documents.Client.ResourceResponse`1<Microsoft.Azure.Documents.Document>> Microsoft.Azure.Documents.Client.DocumentClient.ReadDocumentAsync(System.Uri, Microsoft.Azure.Documents.Client.RequestOptions)'.
at Microsoft.Azure.Documents.ChangeFeedProcessor.DataAccess.ChangeFeedDocumentClient.ReadDocumentAsync(Uri documentUri)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Azure.Documents.ChangeFeedProcessor.DataAccess.ChangeFeedDocumentClient.ReadDocumentAsync(Uri documentUri)
at Microsoft.Azure.Documents.ChangeFeedProcessor.Utils.DocumentClientExtensions.TryGetDocumentAsync(IChangeFeedDocumentClient client, Uri documentUri)
at Microsoft.Azure.Documents.ChangeFeedProcessor.Bootstrapping.LeaseStore.IsInitializedAsync()
at Microsoft.Azure.Documents.ChangeFeedProcessor.Bootstrapping.Bootstrapper.InitializeAsync()
at Microsoft.Azure.Documents.ChangeFeedProcessor.PartitionManagement.PartitionManager.StartAsync()
at Microsoft.Azure.Documents.ChangeFeedProcessor.ChangeFeedProcessor.StartAsync()
Seems to be caused by a break in the CosmosDB SDK ABI, due to the addition of a cancellation token as optional argument. This issue blocks our ability to run changefeed on Linux (due to issue #194). This problem can be fixed trivially by releasing a build of the changefeed library (say, a 2.1 prerelease?) that targets version 2.0 of the SDK.
@eiriktsarpalis What version of the Change Feed Processor library are you using?
ChangeFeed version 2.0.6 and Core SDK version 2.0.0-preview2
@eiriktsarpalis I created an issue in the CFP Library repo to track and a PR to address it: https://github.com/Azure/azure-documentdb-changefeedprocessor-dotnet/pull/97
Thanks, I wasn't aware of that repo.
I took a look at the code, it seems that the ABI breaking change was introduced with cosmos SDK 2.0.0-preview2. I was able to get CF working after I downgraded to 2.0.0-preview.
Most helpful comment
ChangeFeed version 2.0.6 and Core SDK version 2.0.0-preview2