~learn.
0:00 / 1:26
Side quest 20 · Google Docs

Put the doc back to 11:45. Forty people are still typing.

transcript

12:05 AM. The press release is live. The CEO says: put it back to 11:45. And 40 people are still typing in it.

Here's the secret. Every change is a numbered revision in a log. 48,000 so far. 11:45 was revision 47,310. And every 1,000 revisions, a snapshot of the whole text.

So, show 11:45. Replay 47,310 changes from scratch? No. Load the nearest snapshot at or before it. 47,000. Then replay just 310 revisions from the log. Milliseconds.

But here's the catch. Now put it back. Cut the log at 47,310? That destroys history. Lock the doc and swap the text? 40 people freeze. Instead, diff the current text against the 11:45 text. Submit that diff as a new revision. 48,001. Everything after 11:45 is still in the log. So the restore can be undone.

And 48,001 takes the normal path, like any edit. So everyone's pending typing is transformed past it. Nobody stops.

The CEO sees the restore as the newest version. And the published version is still there. Named, never thrown away.

You never go back in a log. You only go forward. A restore is just one more revision.

Full breakdown in the lecture.