zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

Cached storage configuration can be corrupted/outdated

Open kydos opened this issue 2 years ago • 0 comments

Describe the bug

Zenoh's storage manager caches some storage configuration information on under "zenoh home" to avoid querying back-end that are not low-latency at start-up.

This is a good idea, but the current implementation does not consider that the cached information may invalid. This can actually happen and as a consequence can lead the code (https://github.com/eclipse-zenoh/zenoh/blob/958e5a44f180796a2da185ea817f0b9271ae24ff/plugins/zenoh-plugin-storage-manager/src/replica/storage.rs#L99 and https://github.com/eclipse-zenoh/zenoh/blob/958e5a44f180796a2da185ea817f0b9271ae24ff/plugins/zenoh-plugin-storage-manager/src/replica/storage.rs#L109) to fail on unwrapping.

This code should first of all not unwrap the de-serialised types and should recommend the user to remove the cached information if a deserialisation error should occur.

To reproduce

The fastest way to reproduce is to manually mess-up with the some of the files and then start the router with a configured influxdb storage.

System info

  • Any platform
  • Zenoh 0.10-dev

kydos avatar Jul 24 '23 16:07 kydos