Skip to content
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

Merged
merged 3 commits into from Nov 23, 2016

Conversation

liewegas
Copy link
Member

This is important to prevent a silly client from requesting unbounded
work from the OSD (like getting a max of (u64)-1 keys).

@liewegas liewegas added this to the kraken milestone Nov 17, 2016
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>
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
Copy link
Member

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);
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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>
@ghost
Copy link

ghost commented Nov 18, 2016

jenkins test this please (eio now ignored on master)

@liewegas
Copy link
Member Author

@athanatos or @jdurgin mind taking a quick look?

@tchaikov tchaikov self-assigned this Nov 18, 2016
Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@athanatos
Copy link
Contributor

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants