[SERVER-32594] Add mechanism to delete and recreate the "catalog". Created: 09/Jan/18  Updated: 30/Oct/23  Resolved: 02/Feb/18

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

Type: New Feature Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Kyle Suarez
Resolution: Fixed Votes: 0
Labels: rollback-functional
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-29213 Have KVWiredTigerEngine implement Sto... Closed
Related
is related to SERVER-33051 Don't run restart_catalog.js on test ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Storage 2018-01-15, Storage 2018-01-29, Storage 2018-02-12
Participants:
Linked BF Score: 0

 Description   

Recover to stable timestamp works by "pulling the rug out" from underneath in-memory state, which is constructed from the storage engine's data. To safely recreate the in-memory state, internal caches will be rebuilt. This includes rebuilding the "catalog". In short, this work should expose one method to throw away and one method to recreate the catalog. In between these methods, recover to a stable timestamp can "pull the rug out".

Requirements:

  • Expose a method that destroys the catalog.
  • Expose a separate method that reconstructs the catalog.
  • After calling these methods, the catalog objects must be refreshed, sourcing their state from the current on-disk image, just as if this were startup.
  • This includes:

Assumptions:

  • It is sufficient to only implement the requirement for storage engine's that support recover to a stable timestamp (i.e: only KVStorageEngine).
  • The code should assume (i.e: invariant) a Global X lock is held when entering both calls.

Constraints:

  • The storage engine must not be destroyed.

Out of scope:

  • For the purposes of this ticket, storage engine specific (i.e: WiredTiger, not KVStorageEngine) data only need to be addressed to give the implementor reasonable confidence the underlying storage engine is usable. For example, correctly regenerating internal state of specific storage engines (e.g: WiredTiger's SizeStorer), is beyond the scope of this ticket.


 Comments   
Comment by Kyle Suarez [ 02/Feb/18 ]

Per Slack conversation with Geert, moving catalog_control.cpp to the catalog_helpers library will induce a library cycle with the repl/oplog library, so punting the reorganization to a future commit.

Comment by Kyle Suarez [ 31/Jan/18 ]

Re-opening this so I can make a minor adjustment to the shared libraries.

Comment by Githook User [ 31/Jan/18 ]

Author:

{'email': 'kyle.suarez@mongodb.com', 'name': 'Kyle Suarez', 'username': 'ksuarz'}

Message: SERVER-32594 add mechanism to close and reopen the catalog
Branch: master
https://github.com/mongodb/mongo/commit/0322da76ec976d240191b1ca8f70c2c732f9753a

Generated at Thu Feb 08 04:30:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.