Pass min_lsn instead, as per suggestions

it's safer

https://github.com/neondatabase/neon/pull/3689/files#r1115650916
This commit is contained in:
Arpad Müller
2023-10-25 20:40:59 +02:00
parent ed923b6102
commit c205e96d89

View File

@@ -362,7 +362,7 @@ impl Timeline {
(false, false) => {
// This can happen if no commit records have been processed yet, e.g.
// just after importing a cluster.
Ok(LsnForTimestamp::NoData(max_lsn))
Ok(LsnForTimestamp::NoData(min_lsn))
}
(true, false) => {
// Only found a commit with timestamp smaller than the request.
@@ -373,7 +373,7 @@ impl Timeline {
}
(false, true) => {
// Didn't find any commit timestamps smaller than the request
Ok(LsnForTimestamp::Past(max_lsn))
Ok(LsnForTimestamp::Past(min_lsn))
}
(true, true) => Ok(LsnForTimestamp::Present(commit_lsn)),
}