Database / Mnesia intermediate to advanced Interview questions
What is mnesia:set_master_nodes/2 used for?
mnesia:set_master_nodes(Table, Nodes) designates specific nodes as the authoritative source for
a table's data when Mnesia needs to decide which replica to trust — most notably when recovering from an
inconsistent database state after a network partition, where by default Mnesia can't automatically pick a
winner on its own.
mnesia:set_master_nodes(person, ['nodeA@host']).
By marking nodeA as the master for the person table, you're telling Mnesia that if
a conflict needs resolving, this node's copy should be treated as correct, and other replicas should sync from
it rather than the reverse. This is a proactive configuration step, typically set up as part of planned
disaster-recovery procedures, rather than something decided reactively in the middle of an actual partition
event.
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...
