string max_marker;
const std::string& period_marker; //< max marker stored in next period
- map<string, bufferlist> entries;
- map<string, bufferlist>::iterator iter;
+ std::set<std::string> entries;
+ std::set<std::string>::iterator iter;
string oid;
}
iter = entries.begin();
for (; iter != entries.end(); ++iter) {
- ldout(sync_env->cct, 20) << __func__ << ": full sync: " << iter->first << dendl;
+ marker = *iter;
+ ldout(sync_env->cct, 20) << __func__ << ": full sync: " << marker << dendl;
total_entries++;
- if (!marker_tracker->start(iter->first, total_entries, real_time())) {
- ldout(sync_env->cct, 0) << "ERROR: cannot start syncing " << iter->first << ". Duplicate entry?" << dendl;
+ if (!marker_tracker->start(marker, total_entries, real_time())) {
+ ldout(sync_env->cct, 0) << "ERROR: cannot start syncing " << marker << ". Duplicate entry?" << dendl;
} else {
// fetch remote and write locally
yield {
- RGWCoroutinesStack *stack = spawn(new RGWMetaSyncSingleEntryCR(sync_env, iter->first, iter->first, MDLOG_STATUS_COMPLETE, marker_tracker), false);
+ RGWCoroutinesStack *stack = spawn(new RGWMetaSyncSingleEntryCR(sync_env, marker, marker, MDLOG_STATUS_COMPLETE, marker_tracker), false);
// stack_to_pos holds a reference to the stack
- stack_to_pos[stack] = iter->first;
- pos_to_prev[iter->first] = marker;
+ stack_to_pos[stack] = marker;
+ pos_to_prev[marker] = marker;
}
}
- marker = iter->first;
}
collect_children();
} while ((int)entries.size() == max_entries && can_adjust_marker);