Database / Mnesia basics Interview questions
What is mnesia:force_load_table/1 and when should you use it?
mnesia:force_load_table/1 tells Mnesia to load a table from the local node's copy immediately,
overriding its normal safety check that waits to confirm it has the most up-to-date, authoritative copy before
proceeding. It's a deliberate override for a table that's stuck loading and blocking system startup.
mnesia:force_load_table(person).
This is explicitly a last-resort recovery tool, not a routine operation: forcing a load means accepting whatever data is on this node's disk as correct, even if another (currently unreachable) replica actually held more recent writes, which could mean silently losing those newer changes. It should only be used after you've confirmed, through investigation, that this node's copy really is the one you want treated as authoritative — not as a reflexive fix the moment a table appears stuck.
More Related questions...