[SERVER-81297] Simplify CollectionIndexUsageTracker Created: 21/Sep/23  Updated: 29/Oct/23  Resolved: 11/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Henrik Edin Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-77131 Remove and ban any write to collectio... Closed
Assigned Teams:
Storage Execution NAMER
Backwards Compatibility: Fully Compatible
Sprint: Execution NAMR Team 2023-10-02, Execution NAMR Team 2023-10-16
Participants:

 Description   

The CollectionIndexUsageTracker is using the shared decorations on Collection instances while implementing its own versioning mechanism. This leads to overly complicated code and a less robust versioning system that needs to rely on rollback handlers and handling inconsistent state.

We should be able to piggyback on the existing Collection versioning system to simplify this class and index add/removal by getting rid of unnecessary rollback handlers.



 Comments   
Comment by Githook User [ 10/Oct/23 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-81297 Simplify CollectionIndexUsageTracker concurrency model

The CollectionIndexUsageTracker now relies on the Collection-type copy-on-write machinery to implement its own copy-on-write. This makes it much easier to keep the CollectionIndexUsageTracker in sync with the Collection without the need for explicit rollback handlers.
Branch: master
https://github.com/mongodb/mongo/commit/6d25079a01e5fd3667070d0d53bc20a67d6f9e1f

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