-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Fix possible BUGCHECK "cannot find tip page" during validation with -full or -mend option #7857
base: master
Are you sure you want to change the base?
Fix possible BUGCHECK "cannot find tip page" during validation with -full or -mend option #7857
Conversation
…full or -mend option If a primary record version has a transaction number which is greater than NT and seems corrupted, its state will be treated as tra_active to avoid an attempt to fetch a non-existing TIP page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objection, just one question - what consequences you expect with such change, if it is Next
on disk is wrong (less than actual value) ?
Perhaps such condition could be detected in walk_tip()
?
The actual value - do you mean it as the number of the last non-active transaction on the TIP? |
Yes, exactly. |
If such corruption is detected, is it possible to fix it safely? Which page can we trust more - the header or the TIP? |
If |
Do we expect any more commits inside this PR? Or can it be merged now? |
…o state which number is greater than Next transaction. When -mend option is specified, fix it by advancing Next transaction. 2. Do not call TRA_extend_tip() when it's possible to reconstruct the TIP chain using tip_next from the previous page. Also TRA_extend_tip() call is only allowed when the sequence is not found at the end of the vector. It prevents the potential loss of TIPs because this function unconditionally allocates a new TIP and overwrites tip_next. 3. Check the count of elements in the vector before accessing them to avoid an assertion failure in getElement().
Conflicts are solved. Please review. |
If a primary record version has a transaction number which is greater than NT and seems corrupted, its state will be treated as tra_active to avoid an attempt to fetch a non-existing TIP page.