[SERVER-71660] Add a term/generation counter/version for the CollectionCatalog Created: 28/Nov/22  Updated: 14/Feb/23  Resolved: 13/Feb/23

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

Type: Task Priority: Major - P3
Reporter: Matthew Saltz (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-73956 Complete TODO listed in SERVER-71660 Closed
related to SERVER-74003 Complete TODO listed in SERVER-71660 Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

Currently, we use pointer values to check whether the CollectionCatalog has been updated when trying to acquire a consistent catalog and snapshot. This is fine most of the time but it's technically possible that the memory address could be reused for the new version of the catalog, so the pointer values could be the same even if the catalog has actually been updated. We should consider adding a counter/catalog version that gets updated whenever a new version of the catalog is created, so that we can reliably compare two versions of the catalog.



 Comments   
Comment by Henrik Edin [ 13/Feb/23 ]

We are holding shared_ptr to the CollectionCatalog instances so it is not possible that the instance may have been free'd and re-used.

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