There is a small question about fdb_transaction_get_read_version.
I see from the masterserver’s source code that the read version is related with timestamp (us), and this read version as default options set will have 0.5s time skew, so can this api be used to get a monotonic timestamp?
Any suggestion about how to use it? And do i need to worry about the time skew like over 2s or upper when i fetch a version?
@mengxu Great thanks for you reply, understand it.
Besides, i met a problem which get_read_version has more than 1s skew when i use default options about version.
situations like:
getversion a
sleep 7s
getversion b
---
b - a = 5.4s or 8.5s
The fdb version is 7.1.23 and the whole cluster has only one fdbserver on one machine. And there were no other requests when i fetch the read version.
As i see from the masterserver’s getversion code, the version should be in [7-0.5, 7 + 0.5] when use default version options.
FDB version only guarantees it’s monotonically increasing.
You cannot use version to guess the time.
FDB recovery will bump the version by 5seconds as well.