20. Rows are a cache. The chain is the truth
Rows are the result of replaying a chain through the current clerks; when the rules change, rows are wiped and the chain replayed, per object, with a sweep; no migration script can be correct on every copy.

20. Rows are a cache. The chain is the truth

Rows are the result of replaying a chain through the current clerks; when the rules change, rows are wiped and the chain replayed, per object, with a sweep; no migration script can be correct on every copy.

It is why there are no migrations.

The rows in the database are not the source of truth. The chains are. Every row is the result of replaying a chain through the current clerks.

Now a clerk's rules change. A date is stored differently. A derived field gets a new shape. In a hosted system, that is a migration script.

Here there is no script. Wipe the rows. Replay the chain. The rows come back in the new shape.

It happens per object, when the object is opened. A background sweep catches the rest. Interrupt it, and it starts again.

Why? A hosted backend migrates one table, once, under a window. There are as many copies here as there are devices, and no window in which nobody writes. The only migration that is correct on every copy is the one apply already does.

Check yourself. What happens to an object's rows when its clerk's rules change?

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Collaborators