fn find_slot_meta_else_create<'a>(
    db: &Database,
    working_set: &'a HashMap<u64, SlotMetaWorkingSetEntry>,
    chained_slots: &'a mut HashMap<u64, Rc<RefCell<SlotMeta>>>,
    slot_index: u64
) -> Result<Rc<RefCell<SlotMeta>>>
Expand description

Returns the SlotMeta with the specified slot_index. The resulting SlotMeta could be either from the cache or from the DB. Specifically, the function:

  1. Finds the slot metadata in the cache of dirty slot metadata we’ve previously touched, otherwise:
  2. Searches the database for that slot metadata. If still no luck, then:
  3. Create a dummy orphan slot in the database.

Also see find_slot_meta_in_cached_state and find_slot_meta_in_db_else_create.