All problems

Stale Telemetry Sample Overwrites a Newer Reading

Level 2 · node · Data · Out-of-order timestamp samples accepted

Scenario

A fictional building service retains the latest temperature reading per sensor. Network delays can deliver older measurements after newer ones, so the service should accept only samples with strictly newer measurement timestamps. The current implementation blindly overwrites records in arrival order.

Requirements

For each sensor, accept a sample only if its measurement timestamp is strictly newer than the stored one. Ignore earlier or equal timestamps without modifying the saved value or time. Compare timestamps independently for each sensor.

Acceptance criteria

  • A newer measurement timestamp updates the reading.
  • An older measurement does not overwrite the newest reading.
  • An equal timestamp does not replace the stored value.
  • Other sensors can update independently.