[SERVER-48253] invariant in IndexCatalogImpl::createIndexOnEmptyCollection() fails due to inaccurate fast count Created: 15/May/20  Updated: 29/Oct/23  Resolved: 29/May/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.4.0-rc8, 4.7.0

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

Issue Links:
Backports
Depends
Related
is related to SERVER-45718 Index builder can skip index building... Closed
is related to SERVER-47356 Remove invariant that fast count is 0... Closed
is related to WT-7408 API to return row and byte counts for... Backlog
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-06-15
Participants:
Linked BF Score: 15

 Description   

The invariant in IndexCatalogImpl::createIndexOnEmptyCollection() relies on the fast count for the collection being accurate. This is not always the case, especially in rollback scenarios. A more reliable way to determine if the collection is empty is to check the record store using Collection::isEmpty().



 Comments   
Comment by Githook User [ 30/May/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-48253 fix IndexCatalogImpl::createIndexOnEmptyCollection() invariant to check record store

(cherry picked from commit b8e19f921a765613989c7818e825eb3781da76cf)
Branch: v4.4
https://github.com/mongodb/mongo/commit/903bcf6579085c135f9506933d8f671f54255eb0

Comment by Githook User [ 29/May/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-48253 fix IndexCatalogImpl::createIndexOnEmptyCollection() invariant to check record store
Branch: master
https://github.com/mongodb/mongo/commit/b8e19f921a765613989c7818e825eb3781da76cf

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