-
Notifications
You must be signed in to change notification settings - Fork 38.7k
log: LogError with FlatFilePos in UndoReadFromDisk #30428
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
Conversation
Member fields are used read-only in this method.
These errors should never happen in normal operation. If they do, knowing the FlatFilePos may be useful to determine if data corruption happened. Also, handle the error pos.IsNull() as part of OpenUndoFile, because it may as well have happened due to data corruption. This mirrors the LogError behavior from ReadBlockFromDisk.
These errors should never happen. However, when they do happen, it is useful to log the correct error location (function name). For example, this fixes an incorrect "ConnectBlock()" in "WriteUndoDataForBlock".
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
ACK fa14e1d I think this makes sense and mirroring |
tdb3
left a comment
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.
cr and light test ACK fa14e1d
ryanofsky
left a comment
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.
Code review ACK fa14e1d. This should make logging clearer and more consistent
Summary: > This makes it harder to pass nullptr and cause issues such as > bitcoin/bitcoin@dde7ac5 bitcoin/bitcoin@fa5989d > refactor: Mark IsBlockPruned const > > Member fields are used read-only in this method. bitcoin/bitcoin@aaaa332 This is a partial backport of [[bitcoin/bitcoin#29021 | core#29021]] and [[bitcoin/bitcoin#30428 | core#30428]] Depends on D18256 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D18257
These errors should never happen in normal operation. If they do,
knowing the
FlatFilePosmay be useful to determine if data corruptionhappened. Also, handle the error
pos.IsNull()as part ofOpenUndoFile,because it may as well have happened due to data corruption.
This mirrors the
LogErrorbehavior fromReadBlockFromDisk.Also, two other fixup commits in this module.