Problem
The NOT EXISTS clause in GET_FULL_PAGE_LSN (ext/page_log/palite/palite.cpp ~line 1407) incorrectly excludes valid full pages from the backlink lookup when a discarded delta with matching base_lsn exists. A discarded delta means the delta is superseded, not its base full page. This causes verify_chain to fail with "Full page backlink_lsn mismatch ... expected: 0", returning EINVAL and panicking the eviction thread.
Evidence
Page log state for table_id=57, page_id=1965:
lsn=546143, backlink=463197, base=0, delta=0, discarded=0 <\- new full page \(being written\)
lsn=545145, backlink=463197, base=463197, delta=1, discarded=1 <\- discarded delta
lsn=463197, backlink=461766, base=0, delta=0, discarded=0 <\- valid previous full page
The new full page (546143) has backlink_lsn=463197. The full page at 463197 is valid. But the NOT EXISTS clause finds the discarded delta (545145) with base_lsn=463197 and excludes the full page. get_prev_full_page_lsn returns 0, verification fails.
Fix
Remove the NOT EXISTS clause from GET_FULL_PAGE_LSN:
SELECT p1.lsn FROM pages AS p1, full\_page AS fp WHERE p1.table\_id = ?1 AND p1.page\_id = ?2 AND p1.lsn = fp.backlink\_lsn AND p1.delta = 0;
Impact
- Affects eviction, checkpoint, and cursor operations on disaggregated storage
- Not specific to two-phase eviction
- CI: https://evergreen.mongodb.com/version/69d757b6dff295000716cd66
- is related to
-
WT-17130 Fix page ID reuse after discard in __rec_split_discard
-
- Closed
-