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.
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.
plugins/zenoh-plugin-storage-manager/src/replica/storage.rs: add checks when accessing the timestamp and remove unwrap.
This commit introduces checks before accessing the
timestamp
associated with a Sample — instead of callingunwrap()
.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.
unwrap
.