Remove problematic debug assertions #2010
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
The definition of
FixedHeader
withinPage
previously contained a#[cfg(debug_assertions)]
member which was used for some extra assertions. This was fine originally, but now that we write pages to disk in snapshots, having the serialized format of the page vary depending on compilation profile is problematic.This commit removes said
#[cfg(debug_assertions)]
conditional member fromFixedHeader
, so that the structure, and thus the on-disk format, ofPage
is consistent between debug and release builds.This commit also removes an unrelated but unused
#[cfg(debug_assertions)]
conditional from the pointer map code. We never called this assertion, even in debug builds. If we want to re-enable it in the future, we can restore it from git history; for now, I would prefer not to have unused code committed.API and ABI breaking changes
...Technically kinda, since on-disk artifacts generated by debug builds will now use a different format? But I would consider this a bug fix, not a breakage. We don't release debug builds or use them in prod, so no "real" data will be broken.
Expected complexity level and risk
1
Testing
Describe any testing you've done, and any testing you'd like your reviewers to do,
so that you're confident that all the changes work as expected!
None yet.