[SERVER-56187] replicaset.py should use countDocuments() because count() is deprecated Created: 05/Apr/21  Updated: 29/Oct/23  Resolved: 06/May/21

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Pavithra Vetriselvan Assignee: Siran Wang (Inactive)
Resolution: Fixed Votes: 0
Labels: tig-resmoke
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: STM 2021-05-17
Participants:
Linked BF Score: 49
Story Points: 2

 Description   

replicaset.py runs count() on local.system.replset to decide whether to initiate a test fixture replica set. This version of count() may be unreliable after unclean shutdowns and was deprecated in pymongo 3.7. We should use countDocuments() instead.

While we're here, it might also be worth adding logging to say we're skipping initialization.



 Comments   
Comment by Githook User [ 05/May/21 ]

Author:

{'name': 'Siran Wang', 'email': 'siran.wang@mongodb.com', 'username': 'vincivans'}

Message: SERVER-56187 use count_documents() instead of count()
Branch: master
https://github.com/mongodb/mongo/commit/1f1ef3f0d72ae66e7d9b41fc661827c672e46c9b

Generated at Thu Feb 08 05:38:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.