Database / ScyllaDB Interview questions
Explain the execution flow of a lightweight transaction in ScyllaDB?
A lightweight transaction (LWT) needs every replica involved to agree on both the current value and the outcome of the conditional check before anything is applied, so it runs a Paxos round instead of the normal single-phase write path.
The coordinator first runs a Paxos "prepare" phase, proposing a ballot number to the replicas and asking them to promise not to accept any older proposal, while also learning the current value each replica holds. It then evaluates the IF condition against that value; if it holds, it runs the "propose" phase, asking replicas to accept the new value, and once a majority accepts, a final commit message applies it everywhere. This extra round-trip machinery, compared to a normal write's single pass, is exactly what guarantees the compare-and-swap is linearizable even if multiple clients race to update the same row simultaneously - only one will see its condition succeed.
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...
