[SERVER-56169] Do not use fastcount to count DDL coordinators on stepUp Created: 19/Apr/21  Updated: 29/Oct/23  Resolved: 20/Apr/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: Backlog
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: PM-1965-Milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2021-05-03
Participants:
Linked BF Score: 149

 Description   

Currently we use DBDirectClient::count() to count the coordinators document stored on disk on step-up. Since we are not using any matching predicate this count will just use collection metadata (indexes) to estimate the number of document.
As stated also by our official doc this count may be incorrect in case of an unclean shutdown.

The proposed fix is to use the $count stage instead.



 Comments   
Comment by Githook User [ 20/Apr/21 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-56169 Do not use fastcount to count DDL coordinators on stepUp
Branch: master
https://github.com/mongodb/mongo/commit/0f1caa6d2dc2c28b7363990f9965e4d6ae179d7a

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