}
int RGWBucket::check_object_index(RGWBucketAdminOpState& op_state,
- map<string, RGWObjEnt> result, std::string *err_msg)
+ RGWFormatterFlusher& flusher,
+ std::string *err_msg)
{
bool fix_index = op_state.will_fix_index();
rgw_obj_key marker;
bool is_truncated = true;
+ Formatter *formatter = flusher.get_formatter();
+ formatter->open_object_section("objects");
while (is_truncated) {
map<string, RGWObjEnt> result;
} else if (r < 0 && r != -ENOENT) {
set_err_msg(err_msg, "ERROR: failed operation r=" + cpp_strerror(-r));
}
+
+
+ dump_bucket_index(result, formatter);
+ flusher.flush();
+
}
+ formatter->close_section();
+
store->cls_obj_set_bucket_tag_timeout(bucket, 0);
return 0;
dump_mulipart_index_results(objs_to_unlink, formatter);
flusher.flush();
- ret = bucket.check_object_index(op_state, result);
+ ret = bucket.check_object_index(op_state, flusher);
if (ret < 0)
return ret;
- dump_bucket_index(result, formatter);
- flusher.flush();
-
ret = bucket.check_index(op_state, existing_stats, calculated_stats);
if (ret < 0)
return ret;
list<rgw_obj_key>& objs_to_unlink, std::string *err_msg = NULL);
int check_object_index(RGWBucketAdminOpState& op_state,
- map<string, RGWObjEnt> result, std::string *err_msg = NULL);
+ RGWFormatterFlusher& flusher,
+ std::string *err_msg = NULL);
int check_index(RGWBucketAdminOpState& op_state,
map<RGWObjCategory, RGWStorageStats>& existing_stats,