eclipse-zenoh / zenoh-backend-rocksdb

Backend and Storages for zenoh using RocksDB
Other
13 stars 12 forks source link

[Bug] `payload_data` column family exists without metadata regarding timestamps #129

Closed Charles-Schleich closed 2 months ago

Charles-Schleich commented 4 months ago

Describe the bug

payload_data column family exists and no data_info column Family exists, currently we are generating a timestamp ZenohId=1 upon retrieval of the data stored and sending the timestamp to zenoh. However we are not adding the metadata to the database. With the timestamp rework happening in https://github.com/eclipse-zenoh/zenoh/pull/1188, we no longer have access to the new_reception_timestamp function This will effect replication logic.

After discussion with @JEnoch, proposed solution to fix this is at start up either:

  1. Refuse to start Plugin if no metadata is detected in database. metadata includes, timestamp, deleted flag, and encoding.

  2. Start plugin, and for payloads that do not have meta-data, generate metadata its possible to generate metadata for timestamp. but not for deleted flag or encoding. I'm not sure this option is possible if we do not know the original encoding of the data.

To reproduce

Start instance of plugin with RocksDB, with existing Rocksdb database, and existing payload data but no data_info column family.

System info

zenoh-backend-rocksdb git hash 679be9788309c611ccd29cdff586d4a5a2f17e64