-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Engines, Storage Engines - Persistence
-
SE Persistence - 2025-07-04
-
5
Our implementation of page discard is correct, if:
- It does not discard any pages that are still needed.
- It discards all pages that are no longer needed by the latest checkpoint.
To that extent, we need to implement a verification routine that ensures the above two properties. One way to achieve this would be as follows:
- Reopen the database (to completely clear the cache).
- Iterate through all keys in the table, so that we access every single page in it, and record which page IDs we are accessing. We could do this either through verbose output, or through adding a debug interface to PALI and implementing it in PALM (this would be cleaner than string parsing, and it would also make debugging easier).
- List all available page IDs from PALM, such as through adding another debug function to PALI that would do this.
- Compare the two sets for equality.
This should be implemented as a function. We could possibly also implement this in a command-line tool.
Note that we already have several functions in PALI that are required for our own testing that are implemented in PALM, but are not implemented by mongod's PALI implementation, so there is already a precedence for doing so.