[SERVER-45718] Index builder can skip index building for a non-empty collections due to incorrect fast count value. Created: 23/Jan/20  Updated: 29/Oct/23  Resolved: 27/Jan/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.3.4

Type: Bug Priority: Major - P3
Reporter: Suganthi Mani Assignee: Suganthi Mani
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
Related
related to SERVER-24266 Large discrepancy in SizeStorer after... Backlog
related to SERVER-45201 Implicit collection creation from cre... Closed
related to SERVER-48253 invariant in IndexCatalogImpl::create... Closed
related to SERVER-57578 Use isEmpty instead of numRecords to ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-01-27, Execution Team 2020-02-10
Participants:
Linked BF Score: 86

 Description   

Currently the fast count gets flushed to WT/disk only during following cases.
1) fsync
2) clean shutdown.
3) During releasing WT session at an interval of 60 seconds (default) or 1000 ticks.
4) During recovering to stable timestamp

Basically, fast count is not tolerant to unclean shutdowns. So, if a node containing non-empty collections restarts after an unclean shutdown, there is  a possibility that that fast count returned after node restart can be 0 for that non-empty collection. As, a result, index build can skip index building thinking that's an empty collection.



 Comments   
Comment by Githook User [ 27/Jan/20 ]

Author:

{'username': 'smani87', 'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com'}

Message: SERVER-45718 Index builder ensures empty collection by reading data from
the WT cursor in order to avoid false negatives by fast count.
Branch: master
https://github.com/mongodb/mongo/commit/8b97a284590de1768022562c7007234767c64289

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