-
Notifications
You must be signed in to change notification settings - Fork 275
Description
suspected to be related to a rocksdb version upgrade happens in the past, which breaks user-defined timestamp feature. will develop a fix tool, should not happen again in the future.
Description
versiondb using rocksdb's user-defined timestamp feature, which assign a timestamp with a key, the timestamp is encoded with little endianness and append to the key as postfix, and the UDT feature will handle the timestamp specially, like a tuple (key, timestamp).
But for the wrong blocks, the data are apparently written without the UDT special handling, and read out as (key | timestamp, 0).
Fix
We adopt a non-intrusive strategy to fix:
- add
cronosd changeset fixdata <dir>command to re-insert the wrong data. - we change the versiondb to ignore timestamp
0data.
In this way, we don't automatically trim the timestamp 0 data, so if the same issue happen again in the future, we can still apply the same command to recover it.