Title: Fix: Resolve error in recover_offline for compatibility with MongoDB 4.0+.
Summary
Major changes:
Fix: Replaced the deprecated count() function with countDocuments() in the recover_offline function to ensure compatibility with MongoDB 4.0+.
This change is required because PyMongo no longer supports the count() method. Instead, the count_documents() method from the Collection class should be used. For more details, refer to the PyMongo documentation and MongoDB documentation.
Checklist
[ ] I only found the recover_offline function with this issue. Other functions, such as reset, seem to have already addressed it, but please double-check. Thank you!
Title:
Fix: Resolve error in recover_offline for compatibility with MongoDB 4.0+.
Summary
Major changes:
count()
function withcountDocuments()
in therecover_offline
function to ensure compatibility with MongoDB 4.0+.This change is required because PyMongo no longer supports the
count()
method. Instead, thecount_documents()
method from the Collection class should be used. For more details, refer to the PyMongo documentation and MongoDB documentation.Checklist
recover_offline
function with this issue. Other functions, such asreset
, seem to have already addressed it, but please double-check. Thank you!