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

rgw: add support for the prefix parameter in account listing of Swift API #12047

Merged
merged 3 commits into from Nov 29, 2016

Conversation

rzarzynski
Copy link
Contributor

@rzarzynski rzarzynski commented Nov 17, 2016

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
… API.

Fixes: http://tracker.ceph.com/issues/17931
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
@rzarzynski
Copy link
Contributor Author

No regression in Tempest. S3 isn't affected by the PR.

…jStore_SWIFT.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
@rzarzynski
Copy link
Contributor Author

@yehudasa: refactored the dependency on g_conf by switching to s->cct->_conf in the whole RGWListBuckets_ObjStore_SWIFT class.

Tempest is still fine with this PR.

@yehudasa
Copy link
Member

@rzarzynski I still see use of g_conf there

@rzarzynski
Copy link
Contributor Author

@yehudasa: which places do you mean? I pushed the g_conf refactor as a separated commit 1d7e94b to this PR.

@rzarzynski
Copy link
Contributor Author

@yehudasa: have you meant the occurrences of g_conf in rgw_rest_swift.cc other than those in RGWListBuckets_ObjStore_SWIFT?

@yehudasa
Copy link
Member

@rzarzynski no, it's ok now, not sure what happened before.

s->formatter->open_object_section("container");
s->formatter->dump_string("name", obj.bucket.name);
if (need_stats) {
s->formatter->dump_int("count", obj.count);
s->formatter->dump_int("bytes", obj.size);
}
s->formatter->close_section();
if (!g_conf->rgw_swift_enforce_content_length) {
if (! g_conf->rgw_swift_enforce_content_length) {
Copy link
Member

Choose a reason for hiding this comment

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

@rzarzynski actually, see this one ^^^

Copy link
Member

Choose a reason for hiding this comment

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

@rzarzynski oh, nevermind

Copy link
Contributor

@mattbenjamin mattbenjamin left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -177,7 +177,7 @@ void RGWListBuckets_ObjStore_SWIFT::send_response_data(RGWUserBuckets& buckets)
return;

for (iter = m.begin(); iter != m.end(); ++iter) {
RGWBucketEnt obj = iter->second;
const RGWBucketEnt& obj = iter->second;
Copy link
Contributor

Choose a reason for hiding this comment

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

ok

* in applying the filter earlier as we really need to go through all
* entries regardless of it (the headers like X-Account-Container-Count
* aren't affected by specifying prefix). */
const std::map<std::string, RGWBucketEnt>& m = buckets.get_buckets();
Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@@ -146,7 +146,7 @@ void RGWListBuckets_ObjStore_SWIFT::send_response_begin(bool has_buckets)
set_req_state_err(s, op_ret);
}

if (!g_conf->rgw_swift_enforce_content_length) {
if (! s->cct->_conf->rgw_swift_enforce_content_length) {
Copy link
Contributor

Choose a reason for hiding this comment

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

ok

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