-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Adding more logs to OnRecovery payload #640
Conversation
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.
In order to understand whether the logs are during recovery, we need to include a log when recovery is finished. I agree with adding a single log for this purpose.
I agree as well, simple and solves. |
Talked offline with @vncoelho Perhaps we can include some summary information in the finished log message for easier viewing. |
Co-Authored-By: jsolman <jsolinsky@gmail.com>
} | ||
finally | ||
{ | ||
Log($"{nameof(OnRecoveryMessageReceived)}: finished (valid/total) " + | ||
$"ChgView: {validChangeViews}/{totalChangeViews} " + |
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.
total
is not the count of CN?
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 think it is:
ChangeViewMessages = LastChangeViewPayloads.Where(p => p != null).Select(p => RecoveryMessage.ChangeViewPayloadCompact.FromPayload(p)).Take(this.M()).ToDictionary(p => (int)p.ValidatorIndex),
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.
total
is the total number of messages examined during this run of the recoveryvalid
is the the number of those examined that were valid
In general I am getting this log after "send recovery to resend commit" [14:37:18.201] OnRecoveryMessageReceived: finished (valid/total) ChgView: 0/0 PrepReq: 0/0 PrepResp: 0/0Commits: 1/1 But in other cases, for example "[15:09:45.502] send recovery from view: 0 to view: 1" I got empty payloads. [14:38:41.836] OnRecoveryMessageReceived: finished (valid/total) ChgView: 0/0 PrepReq: 0/0 PrepResp: 0/0Commits: 0/0
[14:38:41.836] OnRecoveryMessageReceived: height=1690 view=1 index=3
[14:38:41.836] OnRecoveryMessageReceived: finished (valid/total) ChgView: 0/0 PrepReq: 0/0 PrepResp: 0/0Commits: 0/0 |
@vncoelho If you are already committed, you will not even consider anything accept the commits, so that would be why you get the first log most likely. The log won't show the total for a message type in the case that it doesn't even examine a particular type of messages. As for the empty payloads, that isn't really empty payloads; if your node is already committed it returns early, but will still hit the finally message and print what looks like empty payloads, but really it means it didn't examine any of the message types. If total is 0, it doesn't mean that there wasn't anything in the payload, it means that the total examined payloads were 0.
|
Add change address documentation
We need more logs for completely understanding
OnRecoveryMessageReceived
, otherwise, we can get confused if we are processing the payload from the RecoverPayload or we are receiving another payload from the network.