Database / Mnesia intermediate to advanced Interview questions
How do you move a table copy from one node to another while the system stays live?
mnesia:move_table_copy(Table, FromNode, ToNode) relocates a table's replica from one node to
another without taking the table offline — useful for rebalancing load, retiring a node, or migrating
data ahead of decommissioning old hardware.
mnesia:move_table_copy(session, 'old_node@host', 'new_node@host').
Internally, this is effectively an add_table_copy/3 onto the new node (copying the current
data across) followed by a del_table_copy/2 on the old one, performed as a coordinated operation
so the table remains continuously available for reads and writes throughout — readers and writers don't
need to pause or retry while the move is in progress, though the operation itself takes time proportional to
how much data has to be copied.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
