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
mimic: rgw: mitigate bucket list with max-entries excessively high #30134
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ivancich
approved these changes
Sep 4, 2019
test this please |
Added DNM because (if I understand https://tracker.ceph.com/issues/41655#note-1 correctly) this caused https://tracker.ceph.com/issues/41655 - once the fix for that merges, I'll cherry-pick it into this PR. |
When listing a bucket with radosgw-admin, the user can specify the maximum number of entries. That number can be unreasonably large, and can affect the performance and memory availability. For example: radosgw-admin bucket list --bucket mybucket1 --max-entries=10000000 This has the potential for creating large data structures at multiple levels in the the call stack of the radosgw(-admin) process, potentially causing the process to run out of memory. This change limits the maximum number of entries requested in all but the high level code to help mitigate this issue. Signed-off-by: J. Eric Ivancich <ivancich@redhat.com> (cherry picked from commit 300429c) Conflicts: src/rgw/rgw_rados.cc - RGWRados::Bucket::List::list_objects_ordered takes an additional argument (unrelated to this change) in master
A recent PR made sure that a bucket listing could not request too many entries at once. It also did a minimum computation for number of entries. For ordered listing the minimum was 0, as required to pass all unit tests. However the minimum for unordered listing was left at 1. In order to make ordered and unordered listing behave the same -- with the exception of ordering -- the minimum for unordered listing is modified to 0. Signed-off-by: J. Eric Ivancich <ivancich@redhat.com> (manually cherry picked from 38e02a7) Conflicts: src/srgw/rgw_rados.cc - automated cherry-pick from master failed strangely: made the changes manually
smithfarm
force-pushed
the
wip-41103-mimic
branch
from
October 1, 2019 13:23
40c56cc
to
934d4db
Compare
@ivancich Please have another look? |
ivancich
approved these changes
Oct 1, 2019
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.
Yep, this looks good!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
backport trackers:
backport of
parent trackers:
this backport was staged using https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh