Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Public data

All results

Loading each time slice once ended 105 rows wrong and the change feed 0, over 61 reads of a live public feed.

Each design at the end

Every design started from the same full load and then ran once after each read of the source. A row is wrong when it differs from the source at that moment: a stale value, an event missing, an event kept under an id the source replaced, or an event the source deleted.

DesignWrongStale valueMissingOld idOf which doubledDeleted, keptVanishedMB readShare of full reload
Full reload0000000436.87100.00%
Time partitions105485340000.040.01%
Incremental by updated time40044000.140.03%
Change feed00000001.030.24%
Change feed, no lookback00000000.140.03%
Change feed, 4-minute lookback00000000.280.06%
Change feed, 2-hour lookback00000003.140.72%

Time partitions misses by design: it waits 30 minutes for late events and never looks back at a partition it has loaded, so every revision and deletion of an older event stays wrong. 53 of its 105 wrong rows are missing events. At the last read no live event had its origin inside the 30-minute wait, so all of them reached the source, or moved to their origin time, after their slice had closed.

Time partitions drifted from the first read and kept drifting. Incremental by updated time picked up a wrong row at each re-key and never lost it. The change feed stayed at zero.

Rows wrong after each read, no outage.

Time partitionsIncremental by updated timeChange feedFull reload

Rows wrong after each read, by design02550751001251112131415161Read, one every 4 minutesRead 1 of 61: time partitions 0, incremental by updated time 0, change feed 0, full reload 0 rows wrongRead 6 of 61: time partitions 14, incremental by updated time 0, change feed 0, full reload 0 rows wrongRead 11 of 61: time partitions 23, incremental by updated time 3, change feed 0, full reload 0 rows wrongRead 16 of 61: time partitions 24, incremental by updated time 3, change feed 0, full reload 0 rows wrongRead 21 of 61: time partitions 29, incremental by updated time 3, change feed 0, full reload 0 rows wrongRead 26 of 61: time partitions 34, incremental by updated time 3, change feed 0, full reload 0 rows wrongRead 31 of 61: time partitions 44, incremental by updated time 3, change feed 0, full reload 0 rows wrongRead 36 of 61: time partitions 53, incremental by updated time 3, change feed 0, full reload 0 rows wrongRead 41 of 61: time partitions 64, incremental by updated time 3, change feed 0, full reload 0 rows wrongRead 46 of 61: time partitions 82, incremental by updated time 3, change feed 0, full reload 0 rows wrongRead 51 of 61: time partitions 98, incremental by updated time 4, change feed 0, full reload 0 rows wrongRead 56 of 61: time partitions 104, incremental by updated time 4, change feed 0, full reload 0 rows wrongRead 61 of 61: time partitions 105, incremental by updated time 4, change feed 0, full reload 0 rows wrong

What the source did

Across 61 reads, 4 hours apart from first to last, the window held about 10,196 live events. It changed a little at every read.

What the source didCount
New events83
Revised (a tracked field changed)49
Re-published under a new id4
Deleted0
New, with an update time older than the newest already seen0
Records failing the row contract (last read)29

The source deleted no event while it was recorded. Its record for the whole 30.9-day window still lists 175 deleted events. For 173 of them the last update came at least 4 minutes after their origin, for 80 a day or more after.

Revisions run long too. On the last read, 8,530 of the 10,196 live events had last been updated more than 30 minutes after they happened, 5,289 more than a day after and 2,165 more than a week after. So updates land long after an event happens; at the last read the slice table had missed 48 corrections. 810 live events carry more than one id, the trail of a re-key.

Which checks fired

Six checks ran after every load. Counted over the four designs and every read after the first. A good check fires on wrong tables and stays quiet on right ones.

CheckFired on a wrong tableFired on a right tableFired on a doubled event
One row per id0 of 1150 of 1250 of 55
Row contract0 of 1150 of 1250 of 55
No deleted status0 of 1150 of 1250 of 55
Old id (as declared)115 of 115125 of 12555 of 55
Old id, the source's own pairs allowed, built for the miss above55 of 1150 of 12555 of 55
Row count against the source114 of 1150 of 12555 of 55
Newest update within 30 minutes17 of 1150 of 1250 of 55

The old-id check as declared fires on every table, the full reload included, because the source itself lists 1 live event among another's ids. Allowing the source's own pairs, as a variant does, quiets it on right tables.

How far back the change feed reads

The change feed reads rows updated since its last run minus a lookback, to catch rows that the service makes visible late. Every lookback ended the same. Four lookbacks, same reads:

LookbackWrong at the endMissingMB read
Change feed, no lookback000.14
Change feed, 4-minute lookback000.28
Change feed, 30-minute lookback (the design)001.03
Change feed, 2-hour lookback003.14

Retries

The retry policy allows three retries with exponential backoff. 33 of 240 runs recovered by a retry. None of the 240 failed all four attempts. Failures are drawn separately for each design. Across all 420 runs, lookback variants included, two failed every attempt and left their tables 5 and 1 rows wrong at that read only, right again at the next. A replay with no planted failures gave the slice table's and the change feed's wrong rows read for read.

DesignRunsRecovered by a retryFailed after four attempts
Full reload60110
Time partitions6080
Incremental by updated time6050
Change feed6090

Schema drift: GitHub push events, 2012 to 2025

The second source is GH Archive, an hourly record of public GitHub events. 10,000 push events, 2,000 from each of five hours between 2012 and 2025, change shape twice. Before 2015 they carry no event id and list commits under another name. In 2025 a new field appears. Three loaders, scored on the commit count each loads against the count the event itself states:

LoaderRightRejectedLoaded wrong or empty
Strict to the newest shape5946400054
Lenient, missing fields as null594604054
Versioned contract1000000

The versioned contract is right on all of them because it reads the stated count, the same field it is scored on. The finding is the other two rows. A lenient loader fails nothing and loads 4,000 empty counts, and both of the others undercount 54 large pushes, because the commit list stops at 20.

A slice load that re-reads its last day

Time partitions that, on every run, also delete and re-load every slice of the day before the newly closed one (as declared). It ran over the same 61 reads in a replay with no planted read failures, which first reproduced plain time partitions' wrong rows read for read and the change feed's zero, as controls (every count).

It ended 86 rows wrong: 37 stale values, 46 missing and 3 under an old id, all of them among the 105 the slice table ends wrong. It read 1.99% of a full reload's data per run after the first load, 8.4 times the change feed's. A one-day window cannot reach an earthquake that first appears later than that, and 46 of the 79 new ones (the 83 new events less the 4 re-keys) first appeared more than a day after they happened (median 2.3 days), while 5,289 of 10,196 earthquakes were last updated more than a day after they happened.

By the rule declared with it, 1 or more wrong rows leaves the call as it was.

Re-reading 3 and 7 days

The same design with a window of 3 days and of 7 days (as declared). They ran in the same kind of replay, which first reproduced plain time partitions, the change feed and the 1-day re-read exactly, as controls (every count).

By the rule declared with them, the call stands.

A second recording

The same recorder, query and window, reading every 4 minutes for a fixed 6 hours and 15 minutes (as declared). It made 94 reads over 6.2 hours (the second recording). The four designs ran over it from a fresh first load in a replay with no planted read failures. Over the first recording, the same replay reproduced every design's wrong rows read for read and its data read, as controls (every count).

The source deleted no events that had been live at an earlier read and re-published seven under a new id. 10,872 events were live at the last read. After the first load the full reload read 749.7 times the change feed's data.

Incremental by updated time ended 7 wrong: it counted the 7 re-published earthquakes twice. Time partitions ended 46 wrong: 11 stale values, 28 missing and 7 under an old id. The change feed and the full reload ended with none.

The four designs after the last of the second recording's 94 reads.
DesignRows wrong at the last readDeleted events keptData read after the first load, kB
Time partitions46048.4
Change feed00964.4
Incremental by updated time70139.4
Full reload00723,014.0

By the rule declared with it, the call stands.

What went wrong or was missed

Back to the study