zestdb icon indicating copy to clipboard operation
zestdb copied to clipboard

TimeStamp resolution and fast writes

Open Toshbrown opened this issue 7 years ago • 2 comments

It is possible to write to the store faster than the smallest resolution of the timestamp in milliseconds.

When this happens the data return by latest, earliest API calls can be out of order causing tests to fail.

Toshbrown avatar May 02 '18 09:05 Toshbrown

Yes, if you write with the same timestamp the write order is not guaranteed. Items in the series with the same timestamps are effectively equal in order. I think it might be worth considering a move to nanosecond timestamps if this is an issue.

jptmoore avatar May 02 '18 10:05 jptmoore

I'm not sure it's a practical issue, as writing at 100hz is probably beyond what most applications require. If it's not too tricky to move to using nanosecond internally but still keeping milliseconds externally. Then it might be worth adding to the todo list.

Toshbrown avatar May 02 '18 12:05 Toshbrown