Skip to content

Commit

Permalink
Fix comment in find_lsn_for_timestamp (#5855)
Browse files Browse the repository at this point in the history
We still subtract 1 from low to compute `commit_lsn`. the comment
moved/added by #5844 should point this out.
  • Loading branch information
arpad-m authored Nov 11, 2023
1 parent 74d150b commit f7249b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pageserver/src/pgdatadir_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,9 @@ impl Timeline {
low = mid + 1;
}
}
// If `found_smaller == true`, `low` is the LSN of the last commit record
// before or at `search_timestamp`
// If `found_smaller == true`, `low = t + 1` where `t` is the target LSN,
// so the LSN of the last commit record before or at `search_timestamp`.
// Remove one from `low` to get `t`.
//
// FIXME: it would be better to get the LSN of the previous commit.
// Otherwise, if you restore to the returned LSN, the database will
Expand Down

1 comment on commit f7249b9

@github-actions
Copy link

@github-actions github-actions bot commented on f7249b9 Nov 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2444 tests run: 2322 passed, 0 failed, 122 skipped (full report)


Flaky tests (4)

Postgres 16

  • test_pageserver_restarts_under_worload: debug
  • test_pageserver_lsn_wait_error_safekeeper_stop: debug

Postgres 14

  • test_pgbench_intensive_init_workload[neon_off-1000]: release
  • test_pgbench_intensive_init_workload[neon_on-1000]: release

Code coverage (full report)

  • functions: 54.6% (8918 of 16330 functions)
  • lines: 81.5% (51328 of 62999 lines)

The comment gets automatically updated with the latest test results
f7249b9 at 2023-11-14T09:26:57.826Z :recycle:

Please sign in to comment.