Open yannbolliger opened 5 years ago
Yes, the storedTimestamp could be changed to something else or a boolean instead to detect the initialization part.
The other issues are a bit more tricky and more related to the application using them, due to way the original paper was written. The application using the library should take care of the block management, so writing a timestamp too far was never an issue that the library has to manage. Same applies to the negative timestamps, if we follow the original paper (in-order inserts).
The timestamp of value
0
is somewhat specially treated by the library and used as initialiser for the fieldstoredTimestamp
in both compression & decompression. This leads to a number of strange behaviours if in the middle of a series some timestamp is 0.It might be a good idea to disallow all non-positive timestamps to protect users from those behaviours.
Also, the same could be applied for timestamps that are too far apart in time.