The Truncated Instant: De-Duplication at One-Second Resolution
De-duplication needs a key, and the laziest key for an event stream is the timestamp rounded down to the second. It feels safe because events that sh...
De-duplication needs a key, and the laziest key for an event stream is the timestamp rounded down to the second. It feels safe because events that share a whole second feel like retries of one another. Sometimes they are. Sometimes a burst of genuinely separate events lands inside a single second, and a key built at second resolution cannot tell them apart from duplicates. In a measured set of 360 events, arranged as 120 bursts of 3 events each within the same second, de-duplication on the truncated key kept 120 records and silently discarded 240 distinct events, a loss of 66.7 percent (Source: batch 16 SD measurement results, group AG5). The events were never duplicates; the key was too coarse to see them.
What The Truncated Instant means
The truncated instant is the condition of an event whose timestamp is cut down to whole seconds before being used as an identity, so that distinct events falling inside the same second collapse onto one key and are treated as copies of each other. In the measured set, 360 events were constructed as 120 bursts of 3 events, the three events of each burst stamped at .100, .450, and .900 milliseconds within the same second, every event carrying a distinct event ID (Source: batch 16 SD measurement results, group AG5). The naive de-duplication key was the timestamp truncated to the second. On that basis, de-duplication retained 120 records and discarded 240 distinct events as if they were duplicates, a silent false loss of 66.7 percent of the set (Source: batch 16 SD measurement results, group AG5). The concept applies wherever a timestamp doubles as an identity key: log ingestion, clickstream processing, sensor collection. It does not apply to display rounding or chart bucketing, where coarser resolution is the point. The harm begins only when the coarse value decides whether two records are the same event.
The nearest neighbour is The Ambiguous Zone, and the two fail in opposite directions. In The Ambiguous Zone, a timestamp's zone abbreviation named several offsets at once, so a parser moved records to genuinely different moments; the instant itself was displaced, in the largest case by 16 hours. In the truncated instant, no event moves anywhere. Each event keeps its true moment, recorded to the millisecond in the source. What changes is only the precision of the key derived from that moment: cut to the second, the key can no longer distinguish events at .100, .450, and .900 milliseconds (Source: batch 16 SD measurement results, group AG5), so three true instants collide on one key and two of the three are thrown away. One concept corrupts the value; the other corrupts the resolution at which values are compared.
Two Hundred and Forty Events Discarded as Copies
The arithmetic of the loss is exact, because the construction makes it exact. Each burst contributed 3 events sharing one truncated key (Source: batch 16 SD measurement results, group AG5). De-duplication keeps one record per key, so each burst of 3 emerged as 1, and the 120 bursts emerged as 120 retained records (Source: batch 16 SD measurement results, group AG5). The other 240 events, each with its own event ID and its own millisecond position (Source: batch 16 SD measurement results, group AG5), were discarded by a rule that reported success. Nothing in the output announces the loss: the retained file is well formed, its keys are unique, and its count, 120, looks like a plausible number of events for a quiet system.
The silence is the operational problem. A de-duplication step is normally audited by how many duplicates it removed, and 240 removals out of 360 (Source: batch 16 SD measurement results, group AG5) reads as a productive cleanup of a retry-heavy stream. The ground truth inverts that reading: the stream contained no duplicates at all, and every removal destroyed a real event. The loss also concentrates exactly where systems are busiest: bursts. A sparse stream survives truncation untouched, so the defect hides during quiet testing and activates under load.
The Full-Precision Key Loses Nothing
The repair requires no new information, because the information was never missing from the records. Each event carried its full timestamp and a distinct event ID (Source: batch 16 SD measurement results, group AG5). When de-duplication used the full millisecond-precision timestamp as its key, it retained 360 of 360 events, with 0 false merges (Source: batch 16 SD measurement results, group AG5). The contrast with the truncated run is the whole argument: the same records, the same de-duplication rule, and a key kept at the precision the source actually supplied produced a perfect result, while the coarsened key destroyed two thirds of the set.
That contrast also disciplines the general lesson. The fault is not de-duplication, and it is not timestamps. It is the quiet decision to derive identity from a value after rounding it. Rounding is a presentation operation; the moment a rounded value becomes a key, every distinction below the rounding grain becomes a candidate false merge. Where a genuine event ID exists, as it did for all 360 measured events (Source: batch 16 SD measurement results, group AG5), the ID is the honest key, and the timestamp should be demoted to an attribute of the event, not its name.
How The Bursts Were Measured
Three hundred and sixty fabricated log lines supplied the evidence here. A deterministic script, seeded at 42, grouped them into 120 bursts; inside each burst, three events share one calendar second yet sit at different millisecond offsets, .100, .450, and .900, and each line carries an identifier found nowhere else in the set (Source: batch 16 SD measurement results, group AG5). With ground truth known in advance, the script de-duplicated twice. A key that kept only whole seconds survived with merely 120 rows, wrongly throwing away 240 genuine events. A key preserving milliseconds kept all 360 rows and merged nothing by mistake (Source: batch 16 SD measurement results, group AG5). All records are synthetic, invented solely for counting purposes; the exercise benchmarks no commercial product and assigns no vendor a score.
Questions, answered
Is second-level de-duplication ever safe?
Only where the source genuinely cannot produce two distinct events inside one second, and that is a property of the source, not of the key. The measured stream placed 3 distinct events in every burst second by construction (Source: batch 16 SD measurement results, group AG5), unremarkable behaviour for logs, clicks, and sensors. Where that property has not been proven, the safe assumption is the measured one: truncation discarded 240 of 360 real events (Source: batch 16 SD measurement results, group AG5).
Why did the pipeline not warn that it was discarding real events?
Because from inside the rule, nothing looked wrong. The truncated keys were unique after de-duplication, the retained 120 records were well formed (Source: batch 16 SD measurement results, group AG5), and the rule had no access to the ground truth that the 240 discarded rows carried distinct event IDs (Source: batch 16 SD measurement results, group AG5). Detection has to be designed in: retain discarded rows for audit, or count distinct IDs before and after.
Should the event ID always be the de-duplication key instead?
Where a trustworthy ID exists, yes, and in this set every one of the 360 events carried a distinct ID (Source: batch 16 SD measurement results, group AG5). The timestamp still matters for ordering, but identity should come from the field minted to provide it. Where no ID exists, the fallback is the fullest precision the source supplies, which here retained 360 of 360 events with 0 false merges (Source: batch 16 SD measurement results, group AG5).
Summary
The truncated instant is a resolution failure disguised as a duplicate problem: cut a timestamp to the second, use it as an identity, and every event sharing that second becomes a copy. In the batch 16 synthetic measurement, 360 events in 120 bursts of 3, stamped at .100, .450, and .900 milliseconds with distinct IDs throughout, were reduced by second-level de-duplication to 120 retained records, with 240 real events silently discarded, while the full millisecond key retained all 360 with 0 false merges (Source: batch 16 SD measurement results, group AG5). Unlike The Ambiguous Zone, where the instant itself is displaced by a misread zone, here the instants are intact and only the key is too coarse to tell them apart. Keep keys at source precision, prefer real event IDs, and audit what de-duplication throws away.
Sources
- Batch 16 SD measurement results, group AG5, from the deterministic synthetic measurement run with seed 42, covering 360 events in 120 bursts of 3, de-duplicated under both keys (Source: batch 16 SD measurement results, group AG5).
- Batch 16 SD run record, section AG5, describing the burst construction and both key results.