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

cls/rgw: list_plain_entries() stops before bi_log entries #14981

Merged
merged 1 commit into from
May 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/cls/rgw/cls_rgw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ static void get_index_ver_key(cls_method_context_t hctx, uint64_t index_ver, str
*key = buf;
}

static void bi_log_index_key(cls_method_context_t hctx, string& key, string& id, uint64_t index_ver)
static void bi_log_prefix(string& key)
{
key = BI_PREFIX_CHAR;
key.append(bucket_index_prefixes[BI_BUCKET_LOG_INDEX]);
}

static void bi_log_index_key(cls_method_context_t hctx, string& key, string& id, uint64_t index_ver)
{
bi_log_prefix(key);
get_index_ver_key(hctx, index_ver, &id);
key.append(id);
}
Expand Down Expand Up @@ -2257,9 +2261,8 @@ static int list_plain_entries(cls_method_context_t hctx, const string& name, con
string filter = name;
string start_key = marker;

string first_instance_idx;
encode_obj_versioned_data_key(string(), &first_instance_idx);
string end_key = first_instance_idx;
string end_key; // stop listing at bi_log_prefix
bi_log_prefix(end_key);

int count = 0;
map<string, bufferlist> keys;
Expand Down Expand Up @@ -2507,7 +2510,7 @@ static int rgw_bi_list_op(cls_method_context_t hctx, bufferlist *in, bufferlist

ret = list_olh_entries(hctx, op.name, op.marker, max - count, &op_ret.entries);
if (ret < 0) {
CLS_LOG(0, "ERROR: %s(): list_instance_entries retured ret=%d", __func__, ret);
CLS_LOG(0, "ERROR: %s(): list_olh_entries retured ret=%d", __func__, ret);
return ret;
}

Expand Down