Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Public data

The outage and its backfill

After an hour without syncing, the backfill left time partitions 77 wrong rows and the change feed none.

What happened

Syncs stop. A credential expires, a service is down, a scheduler is paused for a deploy. The question is what each design looks like after it catches up. A second copy of every design ran on the same reads but skipped every read for one hour. At the first read after it, each design ran its backfill. The full reload simply reloaded. Time partitions re-ran each of the 15 slices it had skipped, reading them as the source stood then. The two cursor designs ran once from the watermark they held when the outage began, which is all a cursor needs.

DesignWrong before the backfillWrong afterRecoveredDoubled afterWithout the outageMB the backfill read
Full reload50050007.29
Time partitions8777100790.01
Incremental by updated time53350330.04
Change feed50050000.05

Recovered counts the rows wrong just before the backfill that it put right. Doubled counts events held twice, under an old id and a new one, after it.

Time partitions recovered 10 rows, the events whose origin fell inside the skipped hour. It could not recover revisions and deletions of events in slices it had already loaded, because a backfill by origin time never reads them again. It ended with 77 wrong rows, against 79 without the outage. The outage copy came out slightly better because its backfill read the skipped slices later, after more revisions had landed. Either way, a design that backfills by event time stays wrong when the source changes by update time.

The cursor designs ended exactly where they would have been without the outage. The change feed ended with zero wrong rows. The incremental design ended with three wrong rows, all doubled: it kept what it always keeps, events under an old id.

The catch-up was cheap for every design but one. The change feed's backfill read 49 kB, against 7.3 MB for the full reload, which pays the whole table again after every outage. For a partitioned table, the fix is to re-read the skipped slices and every slice whose events changed since, which the change feed's own read can name.

The main limit

One outage on one public feed: every sync stopped for 15 reads, one hour in the middle of the recording, while the source kept changing. The outage was planted: a second copy of each design skipped those reads of the real recording.

Back to the study