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
osd: set server-side limits on omap get operations #12059
Conversation
This doesn't apply to the ops that explicitly name keys to read; those aren't as risky. Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
4a40bd1
to
ca83d9a
Compare
limit on the number of keys to return. The OSD now imposes a configurable | ||
limit on the number of keys and number of total bytes it will respond with, | ||
which means that a librados user might get fewer keys than they asked for. | ||
This is necessary to prevent careless users from requesting and unreasonable |
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.
s/and/an/
} | ||
} // else return empty out_set | ||
::encode(out_set, osd_op.outdata); | ||
::encode(num, osd_op.outdata); |
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 a little confused. We change the formatting of the result output here. May the consumers still be able to understand it correctly without making any changes?
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.
set encodes as a u32 followed by N strings. We encode the strings in bl above, encode teh count here (once we know it), then append bl.
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 see, thanks!
Signed-off-by: Sage Weil <sage@redhat.com>
ca83d9a
to
99536f3
Compare
jenkins test this please (eio now ignored on master) |
@athanatos or @jdurgin mind taking a quick look? |
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.
lgtm
lgtm |
This is important to prevent a silly client from requesting unbounded
work from the OSD (like getting a max of (u64)-1 keys).