Database / Mnesia basics Interview questions
How do you stop Mnesia?
mnesia:stop/0 shuts down the Mnesia application on the current node cleanly, flushing any
pending disk writes and detaching from replication with other nodes, without affecting Mnesia's state on other
nodes in the cluster.
mnesia:stop(). %% stopped
This is a graceful local shutdown, distinct from a node crashing outright: other nodes holding replicated
copies of the same tables notice this node went down and can continue operating on their own copies, while
this node's disk-based tables remain intact on disk for the next mnesia:start/0. It's typically
called as part of an orderly application or node shutdown sequence rather than something you'd invoke
mid-operation on a live production node without reason.
More Related questions...