PlanetScale offers undo button to reverse schema migration without losing data

Vitess-based database splits system for 30 minutes allowing users to right regrettable changes

Distributed transaction database biz PlanetScale has introduced an "undo" button it says can reverse schema changes, allowing devs to avoid embarrassing disasters by reverting to the original design without losing data within a 30-minute window.

Based on YouTube-developed distributed relational database Vitess, PlanetScale is a proprietary database-as-a-service designed to make life easier for developers than the open-source system. Based on MySQL, Vitess is used by the likes of Slack, Airbnb, and GitHub for its horizontal, globally scalable online transaction processing (OLTP) architecture. It has added SoundCloud, Solana, and MyFitnessPal as customers since it launched.

With the latest announcement, PlanetScale introduces an "Easy Button" to undo schema migrations that enables users to recover in seconds from changes that break production databases. Dubbed Rewind, the feature lets users "almost instantly" revert changes to the previous healthy state without losing any of the data that was added, modified, or otherwise changed in the interim.

It says the feature is an industry-first. Other databases claiming undo features only revert to snapshots while losing all of the data that had been ingested since the new schema was introduced, the company said.

PlanetScale VP of engineering Nick van Wiggeren told The Register Vitess contributors had built tools to make managing MySQL "really easy."

"We've built Rewind on top of a Vitess technology called V replication, which is like MySQL replication on steroids," he said. "It lets you do all kinds of... very impressive behind-the-scenes work to mung MySQL data the way that you want it. In short, Rewind works by leveraging Vitess V replication technology to tell MySQL to have two views of the world. You have a view of the world from before the schema change, you have a view of the world after the schema change, and it will actually kind of materialize both views of the world while you're writing data, because you [might] need to switch between the new and the old view of the world."

Van Wiggeren argued that 30 minutes was plenty of time to realize there was a problem with a schema migration. "I've worked at GitHub and plenty of other companies that use databases. In my experiences, when you have a bad schema migration, you know within about 30 seconds. Someone Slacks you and says the website down, or you hit refresh on your application monitoring system and there are thousands of error messages."

He said there was no appreciable impact on performance from using the features.

Andy Pavlo, associate professor of databaseology at Carnegie Mellon University, said PlanetScale had introduced a feature that would matter to developers.

"People often focus solely on performance metrics when evaluating database systems," he said. "This is a mistake because most applications are boring and they don't need sub-millisecond query latencies. But almost everyone will have to make schema changes in their applications, and this is where things can go horribly wrong.

"PlanetScale has done a good job prioritizing features in their database service that make it easier for app developers to maintain their applications. Along with their previously announced branch and non-blocking schema change features, the ability to quickly rollback a schema change makes it provide developers with an important escape hatch without losing data." ®

Other stories you might like

  • Experts: AI should be recognized as inventors in patent law
    Plus: Police release deepfake of murdered teen in cold case, and more

    In-brief Governments around the world should pass intellectual property laws that grant rights to AI systems, two academics at the University of New South Wales in Australia argued.

    Alexandra George, and Toby Walsh, professors of law and AI, respectively, believe failing to recognize machines as inventors could have long-lasting impacts on economies and societies. 

    "If courts and governments decide that AI-made inventions cannot be patented, the implications could be huge," they wrote in a comment article published in Nature. "Funders and businesses would be less incentivized to pursue useful research using AI inventors when a return on their investment could be limited. Society could miss out on the development of worthwhile and life-saving inventions."

    Continue reading
  • Declassified and released: More secret files on US govt's emergency doomsday powers
    Nuke incoming? Quick break out the plans for rationing, censorship, property seizures, and more

    More papers describing the orders and messages the US President can issue in the event of apocalyptic crises, such as a devastating nuclear attack, have been declassified and released for all to see.

    These government files are part of a larger collection of records that discuss the nature, reach, and use of secret Presidential Emergency Action Documents: these are executive orders, announcements, and statements to Congress that are all ready to sign and send out as soon as a doomsday scenario occurs. PEADs are supposed to give America's commander-in-chief immediate extraordinary powers to overcome extraordinary events.

    PEADs have never been declassified or revealed before. They remain hush-hush, and their exact details are not publicly known.

    Continue reading
  • Stolen university credentials up for sale by Russian crooks, FBI warns
    Forget dark-web souks, thousands of these are already being traded on public bazaars

    Russian crooks are selling network credentials and virtual private network access for a "multitude" of US universities and colleges on criminal marketplaces, according to the FBI.

    According to a warning issued on Thursday, these stolen credentials sell for thousands of dollars on both dark web and public internet forums, and could lead to subsequent cyberattacks against individual employees or the schools themselves.

    "The exposure of usernames and passwords can lead to brute force credential stuffing computer network attacks, whereby attackers attempt logins across various internet sites or exploit them for subsequent cyber attacks as criminal actors take advantage of users recycling the same credentials across multiple accounts, internet sites, and services," the Feds' alert [PDF] said.

    Continue reading

Biting the hand that feeds IT © 1998–2022