link
This block of codes seem strange to me, under the condition that the if condition is not satisfied, the logic seems to be proposedOldestVersion = min(max(data->version.get(), cursor->getMinKnownCommittedVersion() - maxVersionsInMemory), data->version.get() - 1)
. suppose, a = data->version.get()
, b = cursor->getMinKownCommittedVersion()
. So if a >= b, then proposedOldestVersion
= min(max(a, b), a - 1) = min(a, a - 1). If a < b, then proposedOldestVersion
= min(max(a, b), a - 1) = min(b, a - 1) = a - 1.
So proposedOldestVersion
will always be data->version.get() - 1
, then what’s the meaning of these codes?