Resolution: Works as Designed
Affects Version/s: None
Fix Version/s: None
I'm tasked with cleaning up the warnings for our C# Framework 4.8 project and I'm running into difficulties with resolving obsolete warnings for the Mongo Driver.
The problem is "Count is obsolete. Use CountDocuments" instead. But that's problematic as `CountDocuments` is slower (see linked Issue
NODE-1638). That's not an option for us, as we're already having into performance issues. Thus, like the answer to that issue suggests, we would prefer to use `EstimatedDocumentCount`. But that doesn't seem to be a drop-in replacement! `EstimatedDocumentCount` doesn't take a `filter` argument.
Second problem is that `IFindFluent.Count` is also showing the obsolete warning. But IFindFluent doesn't even have a `EstimatedDocumentCount` alternative.
So how do I solve this? We want to update, but don't want a performance impact. Our customers are already complaining.
(And I'm not even talking about the "when migrating from Count to CountDocuments the following query operations must be replaced" part. Breaking changes are high risk for business logic.)