[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: |
|
||||||||||||
| 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. |