eclipse-zenoh / zenoh

zenoh unifies data in motion, data in-use, data at rest and computations. It carefully blends traditional pub/sub with geo-distributed storages, queries and computations, while retaining a level of time and space efficiency that is well beyond any of the mainstream stacks.
https://zenoh.io
Other
1.37k stars 141 forks source link

fix(storage-manager): validate presence of timestamp #1229

Closed J-Loudet closed 2 weeks ago

J-Loudet commented 2 weeks ago

This commit introduces checks before accessing the timestamp associated with a Sample — instead of calling unwrap().

In theory, a Sample should never arrive to a Storage without a Timestamp. In practice, we cannot guarantee this invariant with certainty (future modifications of the code base?). With these checks, the Storage will simply discard the Sample instead of panicking the entire storage manager.