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

rgw: update is_truncated in function rgw_read_user_buckets #14343

Merged
merged 3 commits into from Apr 11, 2017

Conversation

Projects
None yet
2 participants
@Liuchang0812
Contributor

Liuchang0812 commented Apr 5, 2017

Liuchang0812 added some commits Apr 5, 2017

rgw/rgw_bucket: update is_truncated option in rgw_read_user_buckets f…
…unction

The function called `rgw_read_user_buckets` has one option `bool *is_truncated`
which should be updated, and we could use `is_truncated` to avoid unnessesary
iteration.

Fixes: http://tracker.ceph.com/issues/19365

Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
rgw: use is_truncated to judge whether get all bucket already
That use is_truncated is simple and avoid nessesary list. We have to iterate 11
times initially if there is 100 buckets and iter_max_bucket is 10. We only need
10 times now.

Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Apr 5, 2017

@cbodley would you mind taking a look?

@cbodley

looks right to me, but could you go through and make sure that all callers initialize bool is_truncated = false; so that we don't ever try to read it uninitialized?

@cbodley cbodley self-assigned this Apr 5, 2017

@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Apr 5, 2017

rgw: initialize is_truncated to false explicitly for function rgw_rea…
…d_user_buckets

Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
@cbodley

cbodley approved these changes Apr 6, 2017

@cbodley

This comment has been minimized.

@cbodley cbodley merged commit cde6359 into ceph:master Apr 11, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Apr 12, 2017

thanks @cbodley

@Liuchang0812 Liuchang0812 deleted the Liuchang0812:wip-rgw-read-user-buckets branch Apr 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment