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): do not start when 'timestamping' is disabled #1219

Closed J-Loudet closed 3 weeks ago

J-Loudet commented 3 weeks ago

All storage must have a timestamp associated with a Sample.

As it is possible to publish without adding a timestamp, it means that a Zenoh node must add this timestamp "at some point". Up until now, the default configuration of a router ('timestamping' enabled) combined with the fact that only routers could load plugins (and, thus, storage) made it so that a timestamp was (by default) always added.

Recent changes in Zenoh — namely the fact that not only routers can load plugins and that peers and client have, by default, the 'timestamping' configuration disabled — invalidate these assumptions.

We should then enforce at runtime, that the 'timestamping' configuration is enabled when attempting to load the storage manager.

This commit adds this check by verifying that there is an HLC associated with the Zenoh Session — the HLC is only created if 'timestamping' is enabled (see zenoh/zenoh/src/net/runtime/mod.rs::142).

Charles-Schleich commented 3 weeks ago

LGTM. Related Issue on RocksDB: https://github.com/eclipse-zenoh/zenoh-backend-rocksdb/issues/129