[SERVER-70849] Provide a quicker way to fix document count metadata for a collection Created: 25/Oct/22  Updated: 05/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Andrey Brindeyev Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Storage Execution
Participants:
Case:

 Description   

Once a replica set member terminates abruptly, a number of documents for a collection (that the db.coll.estimatedDocumentCount() returns) may be afftected. This introduces a permanent skew for that collection.

The only way to fix this at the moment is to run the validate() operation or perform an initial sync.

Given the widespread adoption of Kubernetes, this increases the changes of abnormal termination of mongod processes, resulting in skewed counts. Since skewed results are replica set member-unique, this introduces a challenge for applications that are using the primaryPreferred read preference and a single-DC deployment topology: the count results may "flip-flop" since the writes may hit different replica set members.

The improvement here would be to provide a tool that fixes the affected metadata counter faster, comparing to options available today (validate() and initial sync).


Generated at Thu Feb 08 06:17:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.