Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set result.not_modified_since as minimum of last_written_lsn and replay lsn #7794

Closed
wants to merge 2 commits into from

Conversation

knizhnik
Copy link
Contributor

Problem

See https://neondb.slack.com/archives/C04DGM6SMTM/p1715785588061879?thread_ts=1715772441.057759&cid=C04DGM6SMTM

lastReplayedEndRecPtr is advanced after applying WAL record while last written LSN can be advanced while
applying WAL record this is why last_written_lsn can be larger than GetXLogReplayRecPtr(NULL).

Summary of changes

result.not_modified_since = Min(last_written_lsn, result.request_lsn);

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@knizhnik knizhnik requested review from a team as code owners May 17, 2024 14:20
Copy link

github-actions bot commented May 17, 2024

3078 tests run: 2951 passed, 0 failed, 127 skipped (full report)


Flaky tests (2)

Postgres 15

  • test_vm_bit_clear_on_heap_lock: debug

Postgres 14

  • test_synthetic_size_while_deleting: release

Code coverage* (full report)

  • functions: 31.3% (6382 of 20401 functions)
  • lines: 47.7% (48630 of 101897 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
0a0e834 at 2024-05-18T12:46:16.291Z :recycle:

Copy link
Contributor

@hlinnaka hlinnaka left a comment

Choose a reason for hiding this comment

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

With this, you might read an old version of the page, no?

@hlinnaka
Copy link
Contributor

With the repro at PR #7795, this panics:

PG:2024-05-17 16:04:26.250 GMT [1353937] PANIC:  neon_rm_redo: invalid lp
PG:2024-05-17 16:04:26.250 GMT [1353937] CONTEXT:  WAL redo at 0/15B3098 for neon/HOT_UPDATE: old_xmax: 4893, old_off: 102, old_infobits: [], flags: 0x10, new_xmax: 0, new_off: 103; blkref #0: rel 1663/5/16393, blk 0
PG:2024-05-17 16:04:26.252 GMT [1353932] LOG:  startup process (PID 1353937) was terminated by signal 6: Aborted

@hlinnaka
Copy link
Contributor

This was fixed by PR #7795

@hlinnaka hlinnaka closed this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants