-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
log: improve addrman logging #22839
log: improve addrman logging #22839
Conversation
Concept ACK |
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 632e648
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 632e648
Concept ACK |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
ACK 632e648 |
632e648
to
2ac363a
Compare
Rebased and addressed feedback by @naumenkogs . |
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.
re-ACK 2ac363a
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.
ACK 2ac363a
Some non-blocker comments below.
utACK 2ac363a |
ACK 2ac363a, but it'd be great to apply what vasild suggested. |
Given this change is quite small, and re-ACKing is easy, I'd suggest addressing the outstanding review comments before we merge this. Rather than having a followup to change the same lines again. Also @naumenkogs I edited your ACK to remove the @ mention, otherwise it would have ended up in the merge message. |
Makes sense of course, I'll push an update this evening. |
8706b5d
to
2ceab68
Compare
I addressed @vasild's suggestions, thanks for the review! |
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.
ACK 2ceab68
ACK 2ceab68 |
1 similar comment
ACK 2ceab68 |
2ceab68
to
12350e1
Compare
Latest push: I added the bucket position everywhere where only the bucket was logged before and changed to a consistent notation |
12350e1
to
e1d1788
Compare
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.
ACK e1d1788
Thanks!
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.
ACK e1d1788
One non-essential suggestion inline.
e1d1788
to
b65a25a
Compare
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.
ACK b65a25a
ACK b65a25a |
b65a25a log: improve addrman logging (Martin Zumsande) Pull request description: The addrman helper functions `GetNewBucket()` and `GetTriedBucket()` 1) log into the wrong category (`BCLog::NET` instead of `BCLog::ADDRMAN`) 2) log too unspecifically - especially `GetTriedBucket()` gets called from many different places (e.g. `Check_()`, `Serialize()`), it seems sufficient to me logging these when moving an address from new to tried. Running a node with `-checkaddrman=1`and net logging currently results in a lot of repetitive log entries. This PR moves these log entries to `Add_()` and `Good_()` and also adds logging for `Select_()` (allowing statistics about New/Tried success probabilities), `GetAddr_()`, `ClearNew()` and `MakeTried()`. ACKs for top commit: jnewbery: ACK b65a25a vasild: ACK b65a25a Tree-SHA512: 90ab0f64eb44b7388a198efccb613577b74989fea73194bda7de8bfbd50bdb19127cb12f5ec645c7859afdb89290614a79e255f3af0a63a58d4f21aa8fe7b696
Summary: ``` The addrman helper functions GetNewBucket() and GetTriedBucket() log into the wrong category (BCLog::NET instead of BCLog::ADDRMAN) log too unspecifically - especially GetTriedBucket() gets called from many different places (e.g. Check_(), Serialize()), it seems sufficient to me logging these when moving an address from new to tried. Running a node with -checkaddrman=1and net logging currently results in a lot of repetitive log entries. This PR moves these log entries to Add_() and Good_() and also adds logging for Select_() (allowing statistics about New/Tried success probabilities), GetAddr_(), ClearNew() and MakeTried(). ``` Backport of [[bitcoin/bitcoin#22839 | core#22839]]. Depends on D12338. Test Plan: ninja all check-all Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D12339
The addrman helper functions
GetNewBucket()
andGetTriedBucket()
BCLog::NET
instead ofBCLog::ADDRMAN
)GetTriedBucket()
gets called from many different places (e.g.Check_()
,Serialize()
), it seems sufficient to me logging these when moving an address from new to tried. Running a node with-checkaddrman=1
and net logging currently results in a lot of repetitive log entries.This PR moves these log entries to
Add_()
andGood_()
and also adds logging forSelect_()
(allowing statistics about New/Tried success probabilities),GetAddr_()
,ClearNew()
andMakeTried()
.