-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Limit reply size on TMGetObjectByHash queries #6110
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
base: develop
Are you sure you want to change the base?
Limit reply size on TMGetObjectByHash queries #6110
Conversation
…heavy-TMGetObjectByHash-queries
|
Sharing this feedback from Slack: I am looking at the code in However, I think |
…heavy-TMGetObjectByHash-queries
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6110 +/- ##
=========================================
- Coverage 79.1% 79.1% -0.0%
=========================================
Files 836 836
Lines 71245 71247 +2
Branches 8321 8324 +3
=========================================
- Hits 56353 56351 -2
- Misses 14892 14896 +4
🚀 New features to boost your workflow:
|
Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
src/xrpld/overlay/detail/PeerImp.cpp
Outdated
|
|
||
| // Check if by adding this object, reply has reached its | ||
| // limit | ||
| if (reply.objects_size() == Tuning::hardMaxReplyNodes) |
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 am putting this check here instead of limiting the for-loop itself because after we query a node by hash, we check for its validity, meaning, there might be invalid/unregistered hashes in the request. So, we shouldn't count them towards reply size.
…heavy-TMGetObjectByHash-queries
…heavy-TMGetObjectByHash-queries
Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
ximinez
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.
I love how much smaller and simpler this is than the original change! Nice work!
update comparison operator. Co-authored-by: Ed Hennis <ed@ripple.com>
combine strings Co-authored-by: Ed Hennis <ed@ripple.com>
…heavy-TMGetObjectByHash-queries
…heavy-TMGetObjectByHash-queries
Context of Change
Complete details of the context of the change and the change itself is shared in the ticket associated with this.
I am not duplicating the details here to avoid redundancy and confusion.
I will add details of the test and impact in the ticket itself.
Type of Change
.gitignore, formatting, dropping support for older tooling)