mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-17 02:12:56 +00:00
* do a linear search in the case we get None from get_max_timestamp_for_lsn * keep an invariant for low instead one for high that low is always <= the max timestamp * don't set found_smaller/found_larger in the function called by find_lsn_for_timestamp. This is done because, assuming there are multiple commits per lsn with different timestamps, there can be cases where the max commit is bigger than the search, but there is commits that are smaller than the search: such an lsn should not count into the "smaller found" tracking, instead we only should do that if the maximum is also smaller. Otherwise, we might return future where we shouldn't. * delete is_latest_commit_timestamp_ge_than we want more than a bool as output, we want Option<TimestampTz>. our needs are entirely met by get_max_timestamp_for_lsn.